Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Merging cells in excel report in VB/MSaccess

Posted on 2008-10-28
2
Medium Priority
?
212 Views
Last Modified: 2013-11-25
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
0
Comment
Question by:mbsparrow
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 23

Accepted Solution

by:
irudyk earned 2000 total points
ID: 22827174
The syntax seems a bit off, try using:
wsOrder.Range("C" & nStkCode & ": E" & nStkCode).MergeCells = True
0
 

Author Closing Comment

by:mbsparrow
ID: 31510664
Thanks a million that did it.
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

670 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question