dcunningham
Board Regular
- Joined
- Jul 14, 2015
- Messages
- 58
Hi Everyone,
So I have a bit of code that prints off a worksheet in PDF that uses EXP_PDF.DLL. I used this as the basis for my code: https://msdn.microsoft.com/en-us/library/ee834871(v=office.11).aspx.
Now, I'm using this same code with only a few minor alterations (that being changing the name of the worksheet being printed off and the reference to where the file name should come from) and on my computer it works in all three workbooks. On another computer, the one I used to test these workbooks for the site that they're meant to be used at, the print functionality works in all three workbooks as well. However, on three other users' computers that I've tried them on there's one workbook that doesn't (let's call it Problem Child and the working workbooks Golden Children). Problem Child has the same bit of code described above, with the same sort of modifications I mentioned earlier.
Initially I thought that there was a .DLL association issue or something, because that's the line in the code the debugger takes me to when the code is run in Problem Child. But then I realized that since the code that's essentially the same in the two other workbooks on these computers, that there must be some other problem. I thought maybe I had made a typo or something so I deleted the module out of the workbook, exported the working code from one of the Golden Children, imported that code into Problem Child, and made the few changes to sheet and cell references that I needed. After all that, it still doesn't worked and I'm stumped.
Does anyone have any experience with this sort of an issue? Or, any theories of what might be causing the issue? If none of them worked then I'd know it's a problem with the code, but since the code is so similar across the three workbooks I can't understand why it works for two books and not the third.
Regards,
Dan
So I have a bit of code that prints off a worksheet in PDF that uses EXP_PDF.DLL. I used this as the basis for my code: https://msdn.microsoft.com/en-us/library/ee834871(v=office.11).aspx.
Now, I'm using this same code with only a few minor alterations (that being changing the name of the worksheet being printed off and the reference to where the file name should come from) and on my computer it works in all three workbooks. On another computer, the one I used to test these workbooks for the site that they're meant to be used at, the print functionality works in all three workbooks as well. However, on three other users' computers that I've tried them on there's one workbook that doesn't (let's call it Problem Child and the working workbooks Golden Children). Problem Child has the same bit of code described above, with the same sort of modifications I mentioned earlier.
Initially I thought that there was a .DLL association issue or something, because that's the line in the code the debugger takes me to when the code is run in Problem Child. But then I realized that since the code that's essentially the same in the two other workbooks on these computers, that there must be some other problem. I thought maybe I had made a typo or something so I deleted the module out of the workbook, exported the working code from one of the Golden Children, imported that code into Problem Child, and made the few changes to sheet and cell references that I needed. After all that, it still doesn't worked and I'm stumped.
Does anyone have any experience with this sort of an issue? Or, any theories of what might be causing the issue? If none of them worked then I'd know it's a problem with the code, but since the code is so similar across the three workbooks I can't understand why it works for two books and not the third.
Regards,
Dan