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 :)
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
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
 
Upvote 0
Well for the first part you could use the GetOpenFilename to allow the user to select the workbook to open.
 
Upvote 0
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
 
Upvote 0

Forum statistics

Threads
1,215,066
Messages
6,122,948
Members
449,095
Latest member
nmaske

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