Merging cells in excel report in VB/MSaccess

Hi
I am creating a report in my access application and need to merge cells in the report the following code won't work the syntax is wrong help much appreciated. The output is dependant on the number of records so i must use nStock code to denote increment in records.
The original code
 wsOrder.Range("c" & nStkCode).value = recEquipment.Fields("Description") is not suitable as the record overflows. I tried this to merge the cells but getting error.

wsOrder.Range("C"& nStkCode ": E"& nStkCode).MergeCells = True
Thanks
mbsparrow
mbsparrowAsked:
Who is Participating?
 
irudykConnect With a Mentor Commented:
The syntax seems a bit off, try using:
wsOrder.Range("C" & nStkCode & ": E" & nStkCode).MergeCells = True
0
 
mbsparrowAuthor Commented:
Thanks a million that did it.
0
All Courses

From novice to tech pro — start learning today.