473,398 Members | 2,389 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

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\Departments\GOP\Tax\2009 Compliance\Fuel Excise Tax Report 09\FuelTaxReports\?
Jan 7 '10 #1
1 1250
Expand|Select|Wrap|Line Numbers
  1. Sub Macro3()
  2. '
  3. ' Macro3 Macro
  4. '
  5. ' Keyboard Shortcut: Ctrl+e
  6. '
  7.     ChDir _
  8.         "\\FS2\Departments\GOP\Tax\2009 Compliance\Fuel Excise Tax Report 09\FuelTaxReports"
  9.     ActiveWorkbook.SaveAs Filename:= _
  10.         "\\FS2\Departments\GOP\Tax\2009 Compliance\Fuel Excise Tax Report 09\FuelTaxReports\TEST.xls" _
  11.         , FileFormat:=xlExcel8, Password:="", WriteResPassword:="", _
  12.         ReadOnlyRecommended:=False, CreateBackup:=False
  13.     Workbooks.Open Filename:= _
  14.         "\\FS2\Departments\GOP\Tax\2009 Compliance\Fuel Excise Tax Report 09\FuelTaxReports\TEST.xls"
  15.     ActiveWorkbook.SaveAs Filename:= _
  16.         "\\FS2\Departments\GOP\Tax\2009 Compliance\Fuel Excise Tax Report 09\FuelTaxReports\A2" _ How do i get the A2 to be the cell value from my file?
  17.  
  18.  
  19.         , FileFormat:=xlExcel8, Password:="", WriteResPassword:="", _
  20.         ReadOnlyRecommended:=False, CreateBackup:=False
  21. End Sub
Jan 7 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Michael Kennedy [UB] | last post by:
Hi Everyone, I have this multithreaded C# windows forms application which does a lot of image processing. Occasionally, I get the following error: A generic error occurred in GDI+....
1
by: Sachin | last post by:
Hi, I am trying to save a file using the following code. MessageBox("Saving file","",MB_OK); _Module.m_pWebBrowser->get_Document(&pDisp); spHTMLDocument2 = pDisp; IPersistFile* pFile ...
6
by: Vijay | last post by:
I need to generate HTML files based on the some codes. One HTML file per code. I have the link (ex:http://123.234.345.456/WebPages/GetTestData.aspx?SomeCode=25), by passing the code as parameter I...
4
by: dale zhang | last post by:
Hi, I am trying to save and read an image from MS Access DB based on the following article: http://www.vbdotnetheaven.com/Code/Sept2003/2175.asp Right now, I saved images without any...
1
by: terrorix | last post by:
I want to save uploaded file to disk. I have this construction: HttpPostedFile myFile = ((HttpRequest)Request).Files; if (myFile != null) { string fn =...
1
by: M Keeton | last post by:
I currently have a picture which is stored in a "System.Drawing.Image" variable and I want to save it as a bitmap file. I have tried 2 different approaches and both give me the following error: ...
5
by: TheGanjaMan | last post by:
Hi everyone, I'm trying to write up a simple image stamper application that stamps the Exif date information from the jpegs that I've taken from my digital camera and saves the new file with the...
4
by: Pedro Leite | last post by:
Good Afternoon. the code below is properly retreiving binary data from a database and saving it. but instead of saving at client machine is saving at the server machine. what is wrong with my...
90
by: charlesmusco | last post by:
Hi all. I have the following problem. I have an xml file, while I will list below and I am trying to add nodes to the xml document based on user input to a form. The XML doc is ... <?xml...
6
by: Karl | last post by:
Hi all, It may seem like a rather odd request (or not) but I would like to be able to create a file (doc, jpg, xls or one of many other files that can be automated) on a website and stream it to...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.