Issues Printing Images Using Auto Print VBA

pure vito

Board Regular
Joined
Oct 7, 2021
Messages
183
Office Version
  1. 365
Platform
  1. Windows
Hi Everyone,

I'm hoping my issue might be some sort of setting but it's not something I can resolve myself,

I use a macro to print my Labels normally this work fine without issue, but now I have added images,

The label is populated by VLOOKUP's the part number is entered into A1 and the label is populated with information and again this works fine I can Auto print a number of labels without issue,

So now I have also linked images to the part numbers and they display without issue I can also print them individually without issue, but when I run the auto macro the images don't come through on the print.

The macro loops through a list of parts populating the label with the information and image before each print,

Sorry if this is to vauge in short everthing seems to work but when the lables are printed they are missing the image 🤔

Here is the VBA I'm using to print it's a little messy 😬

VBA Code:
Private Sub CommandButton1_Click()

Application.ScreenUpdating = False
Worksheets("Bulk LAB").Visible = True
Sheets("Bulk LAB").Select
ActiveSheet.Range("I11:K11") = TextBox1.Text


 Sheets("AutoPrint").Select
 Columns("M:Q").Select
    Range("Q1").Activate
    Selection.EntireColumn.Hidden = False
 
    Range("N1:P1").Select
    Selection.AutoFilter
    Range("N2").Select
    ActiveSheet.Range("$N$1:$P$50").AutoFilter Field:=1, Criteria1:="<>"
    Range("O2:P2").Select
    Range(Selection, Selection.End(xlDown)).Select
    Selection.Copy
   
    Worksheets("Print list").Visible = True

    Sheets("Print list").Select
    ActiveSheet.Cells(2, 1).Select
        Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
        :=False, Transpose:=False
    
'Sub PrintLogs()
   
    
    Dim lastRow As Long, i As Long
    Dim ws As Worksheet
    Set ws = Sheets("Print list")
    lastRow = ws.Range("A" & Rows.Count).End(xlUp).Row
    With ws
        For i = 2 To lastRow
            If Len(Trim(.Range("A" & i).Value)) <> 0 Then _
            .Range("J" & i).Formula = "Printed"
   .Range("A" & i).EntireRow.Copy
    Sheets("Bulk LAB").Range("A1").PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
        :=False, Transpose:=False
    Sheets("Bulk LAB").PrintOut Copies:=1, Collate:=True, _
        IgnorePrintAreas:=False
        Next i
    End With

Sheets("Print list").Select
 ActiveSheet.Range("A2:J50000").Select
    Selection.ClearContents
  
   
    Sheets("AutoPrint").Select
    ActiveSheet.Range("$N$1:$P$1597").AutoFilter Field:=1
       Columns("N:P").Select
    Range("P1").Activate
    Selection.EntireColumn.Hidden = True
   
    Range("A1").Select
    UserForm1.Hide
    Worksheets("Print list").Visible = False
    Worksheets("Bulk LAB").Visible = False
   Application.ScreenUpdating = True
   
End Sub
 

Attachments

  • Captureergwerg.JPG
    Captureergwerg.JPG
    204.7 KB · Views: 21

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.

Forum statistics

Threads
1,224,823
Messages
6,181,177
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top