473,320 Members | 1,993 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,320 software developers and data experts.

GetSaveAsFilename

18
This is an extract from a working(!) VBA programme in Excel.

Expand|Select|Wrap|Line Numbers
  1.     fs = Application.GetSaveAsFilename("C:\Data")
  2.  
What is the equivalent VBA code for Word? I cannot find it! Any help would be appreciated.

Thanks

Bertie
Apr 25 '07 #1
4 5187
Killer42
8,435 Expert 8TB
I'm far from expert in this area, but I don't think there is a direct equivalent. You might need to play with the FileDialog object to produce something similar.
Apr 25 '07 #2
EByker
18
I'm far from expert in this area, but I don't think there is a direct equivalent. You might need to play with the FileDialog object to produce something similar.
I have, but with no success so far; hence my plea for help ...

Thanks anyway.

B
Apr 26 '07 #3
Killer42
8,435 Expert 8TB
Well, I just wrote this macro in Excel, then tried it in Word. It worked in both.
Expand|Select|Wrap|Line Numbers
  1. Sub aaa()
  2.   Dim fd As FileDialog
  3.   Dim fn As String
  4.  
  5.   ' Create a FileDialog object as a File Picker dialog box.
  6.   Set fd = Application.FileDialog(msoFileDialogFilePicker)
  7.  
  8.   With fd
  9.     .AllowMultiSelect = False
  10.     .InitialFileName = "C:\Data"
  11.     .Title = "Save As..."
  12.     .Show
  13.     fn = .SelectedItems(1)
  14.   End With
  15.   Set fd = Nothing
  16.   Debug.Print "Selected file = ["; fn; "]"
  17. End Sub
Apr 26 '07 #4
EByker
18
Thanks! Works fine.

B
May 18 '07 #5

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

Similar topics

3
by: Vikram | last post by:
Hi, Given below is my task. An user can open the xls file from my website (loaded on the top frame). After filling the Excel, he can click a send button at the bottom frame. By clicking the...
4
by: msnnews.msn.com | last post by:
hi there, i've got a form that populates a datagrid, and a button that calls a function to export to an excel file. All is well with the export, no errors are returned, but the Excel instance...
12
by: Striker | last post by:
I have never used VB, so sorry for the novice questions. I have a very small app in vba that only uses excel as a place to put a button and some code that I need to move to VB. Now it seems...
0
by: RookieDan | last post by:
Im not a rookie but sometimes you encounter problems that you have not had before.. Why can I not save a File with GetSaveAsFilename where the initialname is used AND filefilter set to Excel...
3
by: Rob Tackley | last post by:
-------------------------------------------------------------------------------- Hi all, How can I check if I have an excel speadsheet already open? and if it is, how do I read write from it...
9
by: cloh | last post by:
I a new user of Access (I am learning to use it for an internship) and I have two questions which I can't find direct answers to. I am continuing to work on a GUI that had previously been prepared by...
8
by: ncsthbell | last post by:
I have looked at another posting in here and it seems very complicated by having to write a lot of code and functions. Is this how it has to be done or is there some simplier way?
5
by: Skollie | last post by:
Hi I need help to activate the cancel button in input box to do the comaand "EXIT" in macro here is the macro and no case sensitvityin inputboxes pls tanks Sub Auto_Open() Dim Name As String Dim...
1
by: jimmylee | last post by:
Hi All, Please help me . I am getting aspSmartUploadfile error while uploading file I have already instrall aspSmartUpload.dll and aspSmartUploadutil.dll. how to solve this error. thanks....
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.