J
JeffH
Ok I'm not a VB programer.
However what I'm trying to do is copy a variable starting in cell A4 to D3
and then print (preview in this example) a report. Next the macro moves to
A5, copies the value in D3 and previews a report. Next the macro moves to
A6, copies the value in D3 and previews the report. Ok, I'm sure I'm
insulting you right now.
I have add "If Applicaition.ActiveCell = False Then Exit Sub" to stop
previewing the report when there is no longer a value in A6, A7, etc.
This approach is not very efficient because I don't know how to loop the
macro to to move down a cell, I'm actually typing the cell references in the
macro "R4C1", R5C1, etc. I'm sure this humoring you, but this is my 1st
attempt at this.
See below:
Application.Goto Reference:="R4C1"
If Application.ActiveCell = False Then Exit Sub
Application.CutCopyMode = False
Selection.Copy
Range("D3").Select
ActiveSheet.Paste
Application.CutCopyMode = False
ActiveWindow.SelectedSheets.PrintPreview
Application.Goto Reference:="R5C1"
If Application.ActiveCell = False Then Exit Sub
Selection.Copy
Range("D3").Select
ActiveSheet.Paste
Application.CutCopyMode = False
ActiveWindow.SelectedSheets.PrintPreview
Application.Goto Reference:="R6C1"
If Application.ActiveCell = False Then Exit Sub
Selection.Copy
Range("D3").Select
ActiveSheet.Paste
Application.CutCopyMode = False
ActiveWindow.SelectedSheets.PrintPreview
Application.Goto Reference:="R7C1"
If Application.ActiveCell = False Then Exit Sub
However what I'm trying to do is copy a variable starting in cell A4 to D3
and then print (preview in this example) a report. Next the macro moves to
A5, copies the value in D3 and previews a report. Next the macro moves to
A6, copies the value in D3 and previews the report. Ok, I'm sure I'm
insulting you right now.
I have add "If Applicaition.ActiveCell = False Then Exit Sub" to stop
previewing the report when there is no longer a value in A6, A7, etc.
This approach is not very efficient because I don't know how to loop the
macro to to move down a cell, I'm actually typing the cell references in the
macro "R4C1", R5C1, etc. I'm sure this humoring you, but this is my 1st
attempt at this.
See below:
Application.Goto Reference:="R4C1"
If Application.ActiveCell = False Then Exit Sub
Application.CutCopyMode = False
Selection.Copy
Range("D3").Select
ActiveSheet.Paste
Application.CutCopyMode = False
ActiveWindow.SelectedSheets.PrintPreview
Application.Goto Reference:="R5C1"
If Application.ActiveCell = False Then Exit Sub
Selection.Copy
Range("D3").Select
ActiveSheet.Paste
Application.CutCopyMode = False
ActiveWindow.SelectedSheets.PrintPreview
Application.Goto Reference:="R6C1"
If Application.ActiveCell = False Then Exit Sub
Selection.Copy
Range("D3").Select
ActiveSheet.Paste
Application.CutCopyMode = False
ActiveWindow.SelectedSheets.PrintPreview
Application.Goto Reference:="R7C1"
If Application.ActiveCell = False Then Exit Sub