Logo 
Search:

MS Office Forum

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds

Macros to print one record(one row) at a time

  Asked By: Mona    Date: Sep 14    Category: MS Office    Views: 946
  

I am a newbie try my hands at macros, I am working on a project where
after each row of data is entered, it need to be printed out right
away, then you enter another row of data, the second row gets printed
out, and so on... I would like to build a macro to print the record for
whichever row the cursor is on later on.

Here is what I have using macro recorder.

Product Group Sales
1 a 50
2 b 60
3 a 75

Macro1 Macro
' Macro recorded 4/18/2008 by Preferred Customer
'
' Keyboard Shortcut: Ctrl+i
'
Range("C2").Select
Selection.Copy
Range("A9").Select
ActiveSheet.Paste
Range("A2").Select
Application.CutCopyMode = False
Selection.Copy
Range("B9").Select
ActiveSheet.Paste
Range("B2").Select
Application.CutCopyMode = False
Selection.Copy
Range("C9").Select
ActiveSheet.Paste
Rows("9:9").Select
Application.CutCopyMode = False
Selection.PrintOut Copies:=1, Collate:=True
End Sub

How do I record a macro to handle each new row of data instead of
writing 300 macros. Righ now my macro will only handle the 1st row of
data? Is there a way to treat all the new rows of data as one row that
keeps updating? Maybe something about the way I reference the cell so
it will keep updating?

Share: 

 

No Answers Found. Be the First, To Post Answer.

 
Didn't find what you were looking for? Find more on Macros to print one record(one row) at a time Or get search suggestion and latest updates.




Tagged: