Saving file to a location determined by a cell

D

Dan Hulgin

Hi,

I am developing a form that updates a database. I would like the user
to click on a button and it will save the file as a name determined b
a cell reference, and save it to a folder as determined by another cel
reference. It also needs to update the database, when it is saved. (
need this so they don't mess things up :))

Currently for saving as a particular filename I have:

ActiveWorkbook.SaveAs FileName:="ETR_" & Range("v7").Value & ".xls"
where:
V7 contains the file name i wish to add
This part works, However, this does not give the prompt to update th
exisitng database, whichI need it to do


I also have the following for saving to a particular location:

SavePath = "G:\Labs\Request Form\Database\" & Range("v32").Value
where:
V32 contains the name of the subfolder

But everytime I run the macro all it does is save the file to
G:\Labs\Request Form\Database\
instead of
G:\Labs\RequestForm\Database\whatever is in v32



Also the form works well if I dont run the macro, it updates th
database just fine and gives the correct prompts.

Any help in this matter would be greatly appreciated
 
S

sir_glen

I'm a novice with macros so this could be completely wrong but it seem
to me that instead of

SavePath = "G:\Labs\Request Form\Database\*"* & Range("v32").Value

it should be

SavePath = "G:\Labs\Request Form\Database\ & Range("v32").Value*"*

I haven't tried that but it's a suggestion...

Also, I'm working on macros to do similar things and have gotten a bi
stumped.

I want me macro to check whether or not the cells it is getting th
filename from actually have anything in them. How would I do this? Do
just put the formula I would use in a spreadsheet to do this
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top