I think the reason it wasn't working is because they were separate workbooks. When I figured out I had to add the data as a sheet to the form workbook it worked.
And yes - he deserves a big star!
I swear the error was on that statement and I do Debug. I don't know what happened because it's on another one now and I didn't change anything. When I put the SET ws Form in front of the Set wsdata it says subscript out of range.
Function RangeName(sName As String) As String
RangeName = Application.Substitute(sName, " ", "_")
End Function
Sub MergePrint()
Dim wsForm As Worksheet, wsData As Worksheet
Dim sRngName As String, r As Long, c As Integer
Set wsData = Workbooks("Total Compensation...
I already had it in the letter but maybe I had something typed wrong. I copied and pasted it again and now it's giving me "run-time error '9': Supscript out of range". UGH! This is what I put in the letter:
Function RangeName(sName As String) As String
RangeName =...
I couldn't find the RangeName function in the FAQ - I just googled it. Can you help me with that?
1) Where do I put that code?
2) I removed the EMP_ID column. The reference from wsdata in that statement needs the .Value property, yielding the value 6133 - I have no idea what you're...
I already did the range names in my data file. I highlighted the column and clicked on Define Name and typed in a name. I double checked and they're all still there and there are no spaces in them.
Holly
I'm getting an ambiguous name error on MergePrint. Below is what I put in Visual.
https://res.cloudinary.com/engineering-com/raw/upload/v1464192687/tips/Doc5_ib0bh8.docx
I'm trying to do total compensation report for our employees. I've created a database in Excel and I created the letter in excel. How can I merge the two files to create the letters? I have Excel 2013.
I'm trying to do total compensation report for our employees. I've created a database in Excel and I created the letter in excel. How can I merge the two files to create the letters? I have Excel 2013.
This is the Select Expert Record formula I'm using.
{PS_HEALTH_BENEFIT.COVERAGE_ELECT} = "E" and
{PS_ALL_EMPLOYEES.AL_EMPL_STATUS} = "A" and
isnull({PS_HEALTH_BENEFIT.COVERAGE_END_DT})
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.