I have some code written in Access that I am using to transfer information from the Access database into an Excel spreadsheet and format the spreadsheet.
I have the information moving just fine and I now know how to do some of the formatting. Now I need to be able to take the cell I have selected, find the cell next to it, and then merge the two.
I can't figure out how to do this. I have tried
but this doesn't seem to do anything. Once I have managed to select the second cell, I am not entirely sure how to merge the two. I think the code below is what I would use:
But I am not sure of that either, since I am just trying to get the cell selected at this point.
Here is the code I am working with:
With oSheet.Range("A1:" & Chr(iNumCols + 64) & rs.RecordCount + 1)
For Each C In oSheet.Range("A1:" & Chr(iNumCols + 64) & rs.RecordCount + 1).Cells
If C.Value = "Words in the cell" Then
.Font.Name = "Arial"
.Font.Bold = True
.Font.Size = 12
I know I am using the heck out of this membership and I am really grateful for all of the help everyone here has given me!