Bajjonetaz
New Member
- Joined
- Sep 25, 2023
- Messages
- 5
- Office Version
- 365
- Platform
- Windows
Hi MrExcel team!
I have a file, which I use in that way that I export data from a different system to excel. I later use the data and print article labels for our internal storage.
So I copy my data into the list which you can see in "excel2.png" and what I print is what is visible in "excel1.png"
The VBA runs and automatically prints everything from the list until the first blank, which works great.
However, the QR codes which I use to be able to scan the articles is not updating inbetween each of the prints completed by the VBA.
How can I get the VBA to update the QR codes inbetween the prints?
Sub MacroToPrint()
Application.Dialogs(xlDialogPrinterSetup).Show
Dim i As Long
Dim shD As Worksheet
Set shD = Sheets("Data")
For i = 2 To shD.Range("B:B").Find("*", , xlValues, xlPart, xlByRows, xlPrevious).Row
Application.Wait (Now + TimeValue("0:00:06"))
With Sheets("printsheet") 'Fit the name of your sheet to print
.Range("I3").Value = shD.Range("A" & i).Value
.PrintOut
End With
Next
End Sub
Thanks for your help in this matter
I have a file, which I use in that way that I export data from a different system to excel. I later use the data and print article labels for our internal storage.
So I copy my data into the list which you can see in "excel2.png" and what I print is what is visible in "excel1.png"
The VBA runs and automatically prints everything from the list until the first blank, which works great.
However, the QR codes which I use to be able to scan the articles is not updating inbetween each of the prints completed by the VBA.
How can I get the VBA to update the QR codes inbetween the prints?
Sub MacroToPrint()
Application.Dialogs(xlDialogPrinterSetup).Show
Dim i As Long
Dim shD As Worksheet
Set shD = Sheets("Data")
For i = 2 To shD.Range("B:B").Find("*", , xlValues, xlPart, xlByRows, xlPrevious).Row
Application.Wait (Now + TimeValue("0:00:06"))
With Sheets("printsheet") 'Fit the name of your sheet to print
.Range("I3").Value = shD.Range("A" & i).Value
.PrintOut
End With
Next
End Sub
Thanks for your help in this matter