VBA : Picture Not Showing After Change New Record in Printing

muhammad susanto

Well-known Member
Joined
Jan 8, 2013
Messages
2,077
Office Version
  1. 365
  2. 2021
Platform
  1. Windows
hi all...

Code:
[COLOR=#333333]Sub PrintRecords()[/COLOR]<code style="margin: 0px; padding: 0px; font-style: inherit; font-weight: inherit; line-height: 12px;">Dim fromRecord, toRecord, answer, i As Integer
On Error Resume Next

fromRecord = InputBox("From record", "FROM", 1)
    If fromRecord = 0 Or Not IsNumeric(fromRecord) Then Exit Sub
toRecord = InputBox("To record", "TO", fromRecord)
    If toRecord < fromRecord Or Not IsNumeric(fromRecord) Then Exit Sub
answer = MsgBox("printing records" & fromRecord & " to " & toRecord, vbOKCancel, "PRINT")
    If answer <> vbOK Then Exit Sub
    
For i = fromRecord To toRecord
    [AM8] = i 
    With ActiveSheet
        .PrintOut           
        .FitToPagesWide = 1
        .FitToPagesTall = 1
    End With
Next
 </code>[COLOR=#333333]End Sub[/COLOR]

i have use that macro above after run macro the result not fully working..
i mean in page that contains picture not showing correctly..after change the new record the picture should be change too..

my problem in showing picture that correctly in when/after printing

any helps..thanks..

m.susanto
 
Last edited:

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.

Forum statistics

Threads
1,216,099
Messages
6,128,823
Members
449,470
Latest member
Subhash Chand

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