One of my wireless carriers provides commission data in Excel, each of their downloads has a specific name which refers a month’s commissions. I’ve thought about making a copy of each month’s Workbook when it is available with the name “current download.xls” and then work with it in a know directory.
I’ve just recently discovered InputBox and am wondering if I can use it to ask the user to find (Browse for) the actual file they want, thus saving the step of creating and renaming a copy of the actual file.
Since I like to work with the files as does another Director of my company, and the actual workings are handled on another management level I do not want to point to a specific directory.
I’m thinking there is a way to copy the needed sheets without opening the file but I can save that for another question. First things first...thanks
Here is some code I recorded then tweaked a little, sorry if it isn’t elegant…
value
Sub MoveSheetsToHereFromCurrentdownloadxls()
'
' MoveSheetsToHereFromCurrentdownloadxls Macro
' Macro recorded by charles
'
'
Workbooks.Open Filename:= _
"C:\Documents and Settings\Charles\Desktop\FOLDERS\H*Heartland\commissions & smf download\currentdownload.xls"
'
Windows("currentdownload.xls").Activate
' add Manual adjustments as sheet #1 in C* Commission database.xls
' and then add Transactions just after Manual Adjustments
Sheets("MANUAL ADJUSTMENTS").Move After:=Workbooks( _
"C* COMMISSION DATABASE.xls").Sheets(1)
Windows("currentdownload.xls").Activate
Sheets("TRANSACTIONS").Move After:=Workbooks( _
"C* COMMISSION DATABASE.xls").Sheets("MANUAL ADJUSTMENTS")
Windows("currentdownload.xls").Activate
ActiveWorkbook.Close SaveChanges:=False
ActiveWindow.WindowState = xlMaximized
Range("B9").Select
End Sub
Display More
thanks for any suggestions