Manipulate my macro

almouchie

Board Regular
Joined
Dec 23, 2004
Messages
128
I have this in my macro but I want to be able to do it for any invoice I specify & paste it in the active cell
for instance to open file INVOICES-644
I dont want to change the macro for every invoice I want to paste in the database

another problem how can it paste the data in the cell I want
instead of pasting on top of each other

ChDir "M:\George-Rola\DECEMBER"
Workbooks.Open Filename:="M:\GR\DECEMBER\INVOICES-630.xls"

I would appreicate any help
THANKS :)
 

Some videos you may like

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.

almouchie

Board Regular
Joined
Dec 23, 2004
Messages
128
to make it clearer

ChDir "M:\George-Rola\DECEMBER"
Workbooks.Open Filename:="M:\George-Rola\DECEMBER\INVOICES-630.xls"
Windows("copy of Book1.xls").Activate
Sheets("master").Select
Range("A3").Select
ActiveCell.FormulaR1C1 = "='[INVOICES-630.xls]pre invoice'!R1C7"

when I want to run the macro for another invoice I want it to paste in the row below instead of A3
 

Norie

Well-known Member
Joined
Apr 28, 2004
Messages
76,069
Office Version
  1. 365
Platform
  1. Windows
Well for the first part you could use the GetOpenFilename to allow the user to select the workbook to open.
 

almouchie

Board Regular
Joined
Dec 23, 2004
Messages
128
a little more help actually

the only stuff I know is from the wizz called record macro

ok I found a way
eventhou its opening to my desktop & I have to lead it to the folder I want

but how can I have my macro read this open file & do what I have written in module
& paste it in blank cell I want
 

Watch MrExcel Video

Forum statistics

Threads
1,119,002
Messages
5,575,499
Members
412,670
Latest member
Khin Zaw Htwe
Top