[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now


how can GET arg1-arg30 in xlDialogOpen of EXCEL?

Posted on 2002-04-10
Medium Priority
Last Modified: 2012-06-22
hello, everyone.

If I used followed statement in EXCEL,
    Application.Dialogs(xlDialogOpen).Show arg3:=True
it can popup a file-open-dialog and open a file with read-only.

 But how can I get the args which selected in the file-open-dialog?

1.  I want to GET the all args value which set in file-open-dialog, i.e. , if i changed directory in file-open-dialog, how to get the directoryname after press "OK"?

2.  where can get the explanation of all args such as file_text, update_links, read_only, format, ...

best regards.
Question by:WanNing
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
LVL 44

Expert Comment

ID: 6930849
Hi WanNing, you could've asked this in your previous question no need to close things down when it isn't clear enough you can ask for more feeback from us...

from the old vba macro help for excel can't find it righ away as download


Equivalent to choosing the Open command from the File menu. Opens an
existing workbook.


OPEN(file_text, update_links, read_only, format, prot_pwd,
write_res_pwd, ignore_rorec, file_origin, custom_delimit, add_logical,
editable, file_access, notify_logical, converter)
OPEN?(file_text, update_links, read_only, format, prot_pwd,
write_res_pwd, ignore_rorec, file_origin, custom_delimit, add_logical,
editable, file_access, notify_logical, converter)

File_text    is the name, as text, of the workbook you want to open.
File_text can include a drive and path, and can be a network pathname.
In the dialog-box form in Microsoft Excel for Windows, file_text can
include an asterisk (*) to represent any sequence of characters and a
question mark (?) to represent any single character.
Update_links    specifies whether and how to update external and remote
references. If update_links is omitted, Microsoft Excel displays a
message asking if you want to update links.

If update_links is      Then Microsoft Excel

0      Updates neither external nor remote references
1      Updates external references only
2      Updates remote references only
3      Updates external and remote references

Note      When you are opening a file in WKS, WK1, or WK3 format, the
update_links argument specifies whether Microsoft Excel generates charts
from any graphs attached to the WKS, WK1, or WK3 file.

If update_links is      Charts are

0      Not created
2      Created

Read_only    corresponds to the Read Only check box in the Open dialog
box. If read_only is TRUE, the workbook can be modified but changes
cannot be saved; if FALSE or omitted, changes to the workbook can be
Format    specifies what character to use as a delimiter when opening
text files. If format is omitted, Microsoft Excel uses the current
delimiter setting.

If format is      Values are separated by

1      Tabs
2      Commas
3      Spaces
4      Semicolons
5      Nothing
6      Custom characters

Prot_pwd    is the password, as text, required to unprotect a protected
file. If prot_pwd is omitted and file_text requires a password, the
Password dialog box is displayed. Passwords are case-sensitive.
Passwords are not recorded when you open a workbook and supply the
password with the macro recorder on.
Write_res_pwd    is the password, as text, required to open a read-only
file with full write privileges. If write_res_pwd is omitted and
file_text requires a password, the Password dialog box is displayed.

Ignore_rorec    is a logical value that controls whether the read-only
recommended message is displayed. If ignore_rorec is TRUE, Microsoft
Excel prevents display of the message; if FALSE or omitted, and if
read_only is also FALSE or omitted, Microsoft Excel displays the alert
when opening a read-only recommended workbook.
File_origin    is a number specifying whether a text file originated on
the Macintosh or in Windows.

File_origin      Original operating environment

1      Macintosh
2      Windows (ANSI)
3      MS-DOS (PC-8)
Omitted      Current operating environment

Custom_delimit    is the character you want to use as a custom delimiter
when opening text files.

Custom_delimit is text or a reference or formula that returns text, such
as CHAR(124).
      Custom_delimit is required if format is 6; it is ignored if format is
not 6.
      Only the first character in custom_delimit is used.

Add_logical    is a logical value that specifies whether or not to add
file_text to the open workbook. If add_logical is TRUE, the document is
added; if FALSE or omitted, it is not added. This argument is for
compatibility with workbooks from Microsoft Excel version 4.0.
Editable    is a logical valule that corresponds to opening a file (such
as a template) while holding down SHIFT key. If TRUE, editable is the
equivalent to holding down the SHIFT key while choosing the OK button in
the Open dialog box. If FALSE or omitted, this argument is ignored.

File_access     is a number specifying how the file is to be accessed.
If the file is being opened for the first time, this argument is
ignored. If the file is already opened, this argument determines how to
change the user's access permissions for the file.

File Access      How Accessed

1      Revert to saved copy
2      Change to read/write access
3      Change to read only access

Notify_logical    is a logical value that specifies whether the user
should be notified when the shared document is available to be opened
across a network. If TRUE, the user will be notified when the document
is available to be opened. If FALSE or omitted, the user will not be
notified when the file available to be opened.
Converter     is a number corresponding to the file converter to use to
open the file. Normally, Microsoft Excel automatically determines which
file converter to use; therefore, this argument can usually be excluded.
If you want to be certain, however, that a specific manually installed
converter be used, then include this argument. Use GET.WORKSPACE(62) to
determine which numbers corresponds to all of the installed converters.

LVL 44

Accepted Solution

bruintje earned 800 total points
ID: 6930856
Hi, what are you trying to do with the file open dialog, maybe when you explain what the purpose is we can provide some suggestions on how to get there


for the download of the macro help file of my previous comment


Author Comment

ID: 6932800
oh, thank you very much!
LVL 44

Expert Comment

ID: 6932936
glad i could help

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes how you can use Custom Document Properties to store settings and other information in your workbook so that they will be available the next time you open the workbook.
If you need to forecast numbers -- typically for finance -- the Windows and Mac versions of Excel 2016 have a basket of tools to get the job done.
The viewer will learn how to simulate a series of coin tosses with the rand() function and learn how to make these “tosses” depend on a predetermined probability. Flipping Coins in Excel: Enter =RAND() into cell A2: Recalculate the random variable…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question