Merging cells in Excel 2000 through Access VB (1 Viewer)

trickster

New member
Local time
Today, 08:40
Joined
Aug 15, 2005
Messages
6
Hi I need to know how do I merge cells on an Excel Spreadsheet, using a VB program to generate the spreadsheet, nad to merge the cells. I am using Access 2000 and Excel 2000. Can anybody help me please?
 

fuzzygeek

Energy Ebbing
Local time
Today, 08:40
Joined
Mar 28, 2003
Messages
989
This is code taken from my application. The first group shows how I defined the spreadsheet in access, the second shows how to merge cells:

Process_Begin:
'Dimension the application, the workbook, the worksheets
'the column and row titles; the column and row data
Dim objXL As Excel.Application
Dim wbXL As Excel.Workbook
Dim wsXLValues As Excel.Worksheet
Dim wsXLCCS As Excel.Worksheet

'Merge cells in CCS Spreadsheet (sheet2)
wsXLCCS.Range("G1:I1").MergeCells = True
wsXLCCS.Range("J1:L1").MergeCells = True
wsXLCCS.Range("M1:O1").MergeCells = True
 

trickster

New member
Local time
Today, 08:40
Joined
Aug 15, 2005
Messages
6
Thanks I'll give that a try
 

Users who are viewing this thread

Top Bottom