May 03 2024 06:28 AM
Dear all,
I have created an Excel document that creates a document library code using VBA based on user input.
e.g.
Company = A
Type of Document = B
Date of Execution = C
and so on.
Based on what the user enters, when they click the create code button, some VBA runs in the background and creates a document code e.g. US-ABC-E-123-1
The intent is for that document code that is created in cell B5 to be printed on to a 45x15mm label via our Zebra label printer. However I am struggling to find a way to get excel to print the contents of just that cell at the right size.
The current workaround is that clicking a print button on the worksheet which opens a template in word (which is 45x15), pastes in the code, and then the user prints it in the normal File-Print dialog.
Any ideas on how to solve this issue would be very very much appreciated!
May 03 2024 06:39 AM
SolutionTry setting the height and the width of the cell to the appropriate values, and to set the Print Area of the worksheet to that cell.
May 03 2024 10:09 AM
@Hans Vogelaar Thanks - I'll try that when I get back in the office on Monday.
May 15 2024 06:20 AM
May 03 2024 06:39 AM
SolutionTry setting the height and the width of the cell to the appropriate values, and to set the Print Area of the worksheet to that cell.