I'm trying to save the file with the amount from cell A2 but instead it keeps saving as "Cells(2, 1).Value & FuelTaxReport." Any thoughts?
Sub Macro3()
'
' Macro3 Macro
'
' Keyboard Shortcut: Ctrl+i
'
ChDir _
"\\FS2\Departme nts\GOP\Tax\200 9 Compliance\Fuel Excise Tax Report 09\FuelTaxRepor ts"
ActiveWorkbook. SaveAs Filename:= _
...
User Profile
Collapse
-
Saving a file by cell value?
-
...Code:Sub Macro3() ' ' Macro3 Macro ' ' Keyboard Shortcut: Ctrl+e ' ChDir _ "\\FS2\Departments\GOP\Tax\2009 Compliance\Fuel Excise Tax Report 09\FuelTaxReports" ActiveWorkbook.SaveAs Filename:= _ "\\FS2\Departments\GOP\Tax\2009 Compliance\Fuel Excise Tax Report 09\FuelTaxReports\TEST.xls" _ , FileFormat:=xlExcel8, Password:="", WriteResPassword:="",Last edited by Frinavale; Jan 7 '10, 09:26 PM. Reason: Please post code in [code] ... [/code] tags. Added code tags. -
Saving a file by code?
I'm trying to write code that when the file is open i hit my macro & the file name saves as cell A2 and the file saves to the folder on my network.
where the question mark is how do i get the code to pick up number in cell A2?
Concern is i will be opening multiple files with different file names.
file path:
"\\FS2\Departme nts\GOP\Tax\200 9 Compliance\Fuel Excise Tax Report 09\FuelTaxRe... -
Jim,
I greatly appreciate your time on helping me with the import code. I created the button & set all criteria for field settings & got it to work.
Thanks a million.
cannunzi
cannunzi...Leave a comment:
-
Jim,
I greatly appreciate your feedback on my request but I’m a rookie programmer. Can you suggest the loop method which is more familiar to me then the complex code provided? All my files have the exact column headers but are on a sheet called FuelTaxReport which is not the first sheet.
Thank you!...Leave a comment:
-
Importing multiple files into one access table
I'm trying to import multiple files in one access table all at once but i keep hitting an error stating incorrect file path. The code below works when i change the * to the exact file name but then it only imports the one file. I would like the code to import all files in the folder into the table. Any suggestions?
...Code:Sub FuelTaxImport() DoCmd.TransferSpreadsheet acImport, , _ "FuelTaxReport", "C:\FuelTaxReports\*.xls",
No activity results to display
Show More
Leave a comment: