Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default VBA filesavename

filesavename = Application.GetSaveAsFilename(Range("h9"))

dear ,

above line activated by a "click/button" event. which
reacts quit fine.

I get a window to search for the wanted folder and the
opportunity to save the file with name created in the cell
h9.

However after pressing "save" the window closses but
nothing has been saved!!

did I forgot something?


kind regards

Paul
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default VBA filesavename

Yes, you did

FileSaveName = Application.GetSaveAsFilename(Range("h9"))
ActiveWorkbook.SaveAs FileSaveName

Lars Kofod
-----Original Message-----
filesavename = Application.GetSaveAsFilename(Range("h9"))

dear ,

above line activated by a "click/button" event. which
reacts quit fine.

I get a window to search for the wanted folder and the
opportunity to save the file with name created in the

cell
h9.

However after pressing "save" the window closses but
nothing has been saved!!

did I forgot something?


kind regards

Paul
.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default VBA filesavename

the method simply returns the name that you selected to
be saved.

you need to add:

thisworkbook.SaveAs filesavename

to complete the task. Ideally, your cell woul dhave the
full file path, not just the name. If you dont' have the
full path, then your method is a great way to locate the
relevent folder.


generally, since you have the file name already, you
wouldn't need to use the GetDaveAsFilename method. This
is best used for when the user needs to browse to a
folder then name or overwrite a file.

HTH
Patrick Molloy
Microsoft Excel MVP

-----Original Message-----
filesavename = Application.GetSaveAsFilename(Range("h9"))

dear ,

above line activated by a "click/button" event. which
reacts quit fine.

I get a window to search for the wanted folder and the
opportunity to save the file with name created in the

cell
h9.

However after pressing "save" the window closses but
nothing has been saved!!

did I forgot something?


kind regards

Paul
.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default VBA filesavename

why does it seems so logical when you see it.

Thx to you both




-----Original Message-----
filesavename = Application.GetSaveAsFilename(Range("h9"))

dear ,

above line activated by a "click/button" event. which
reacts quit fine.

I get a window to search for the wanted folder and the
opportunity to save the file with name created in the

cell
h9.

However after pressing "save" the window closses but
nothing has been saved!!

did I forgot something?


kind regards

Paul
.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 02:39 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"