Quantcast
Channel: Excel VBA Codes & Macros
Browsing all 52 articles
Browse latest View live

Export Range to Pipe Delimit Text File

Macro to export range to pipe delimit textfile -Option Base 1Option ExplicitSub export_range_pipe_delimit()Dim arr As VariantDim i As Long, j As LongDim line As StringDim filename As StringDim rng As...

View Article


UDF to Check Cell is having Validation or not

UDF To Check Cell is having validation or not:Function is_validation(rng As Range) As Boolean    Dim i      On Error Resume Next    i = rng.Validation.Type    On Error GoTo 0       If i = 3 Then...

View Article


Export Range in Json Format

Macro to Export Range in Json FormatOption ExplicitSub export_in_json_format()    Dim fs As Object    Dim jsonfile    Dim rangetoexport As Range    Dim rowcounter As Long    Dim columncounter As Long...

View Article

Import Data from Access Table

Macro to import data from access table using Excel VBAOption ExplicitSub import_data()    ' Tools Refrences set microsoft active x object    ' clear exiting data...

View Article

Append Data to Access Table from Excel

Macro to export Excel range to Access tableSub export_data()    ' table to insert, workbook ,range to export    Call insert_data("tbl_sample", ThisWorkbook, Sheet1.Range("a1:b9"))End SubSub...

View Article


Update Access Table from Excel using VBA

Macro to update access database using Update query in Excel VBASub run_sql()    Dim sqlquery As String    sqlquery = "UPDATE tbl_sample SET tbl_sample.rname = ""a"" WHERE [tbl_sample.rname]=""z1"";"...

View Article

Image may be NSFW.
Clik here to view.

Type your Sql Query In inputbox in excel and import data from access to excel

Type Sql Query in input box and import data to excel from Access TableSub import_data()    ' Tools Refrences set microsoft active x object    ' clear exiting data    Dim sqlstring As String...

View Article

Modify Access Table using recordset in Excel VBA

Macro to modify access table using record-set in Excel VBASub update_access_table()    ' Tools Refrences set microsoft active x object    ' clear exiting data    ' run query using where clause , field...

View Article


Image may be NSFW.
Clik here to view.

Connect states with arrows US Map using X Y Scatter Chart

Create connections on map using X Y ScatterDownload the working file here https://app.box.com/s/6oks8mpammnza49tg3k6luhgx7rc5ybpCode to create connections:Option Compare TextOption Explicit' for any...

View Article


Image may be NSFW.
Clik here to view.

Create Sunburst chart in Excel

Create Sunburst Chart in Excel using Doughnut Steps to createDownload the template  linkMake sure data is sortedClick on prepare data buttonChoose the level from the drop -downSelect the chart to...

View Article

Filter rows on comment text

Macro to hide and unhide the rows on comment textOption Compare TextSub filteroncomments()Dim commenttext As StringDim commentrng As RangeDim cl As RangeWith ActiveSheet    .FilterMode = False...

View Article

Import data from SQL

Macro to import data from SQL using ADO connection string:Sub Import_data_from_SQL()' Tools -> References -> Microsoft Active Data object 2.0Dim rs As ADODB.RecordsetDim cnn As...

View Article
Browsing all 52 articles
Browse latest View live