Solved

Merging cells in excel report in VB/MSaccess

Posted on 2008-10-28
2
207 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
2 Comments
 
LVL 23

Accepted Solution

by:
irudyk earned 500 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…

920 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now