M
March
I have to write VBA to merge cells in Excel.
The code need to be in Access.
I write the code to open excel file. Once the file opens, I copy record set
in Access to excel. (Everything works well.)
However, I don't know how to write the code to merge cells.
I use Cells(1,1) instance of range("A1"). I use "Cells" because it is easy
for me when I update the file.
I use the code below to find last used row and col.
Dim xApp as Object
Set xApp = CreateObject("Excel.Application")
lastUsedRow = xApp.sheets("sheet1").UsedRange.Rows.Count
lastUsedCol = xApp.sheets("sheet1").UsedRange.Columns.Count
I want to know how to reference
col(1) = A, col(2) = B, ..., col(26) = Z, col(27) = AB,..., col(52) = AZ,...
and so on.
I have to fill data across the column up to "DE" and will have more.
Column is only problem that I have to deal with.
Please give me suggestion.
March
The code need to be in Access.
I write the code to open excel file. Once the file opens, I copy record set
in Access to excel. (Everything works well.)
However, I don't know how to write the code to merge cells.
I use Cells(1,1) instance of range("A1"). I use "Cells" because it is easy
for me when I update the file.
I use the code below to find last used row and col.
Dim xApp as Object
Set xApp = CreateObject("Excel.Application")
lastUsedRow = xApp.sheets("sheet1").UsedRange.Rows.Count
lastUsedCol = xApp.sheets("sheet1").UsedRange.Columns.Count
I want to know how to reference
col(1) = A, col(2) = B, ..., col(26) = Z, col(27) = AB,..., col(52) = AZ,...
and so on.
I have to fill data across the column up to "DE" and will have more.
Column is only problem that I have to deal with.
Please give me suggestion.
March