Solved

how can GET arg1-arg30 in xlDialogOpen of EXCEL?

Posted on 2002-04-10
4
885 Views
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?

QUESTION:
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.
0
Comment
Question by:WanNing
  • 3
4 Comments
 
LVL 44

Expert Comment

by:bruintje
Comment Utility
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

==========================================
OPEN:

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

Syntax

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
saved.
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.
==========================================


:O)Bruintje
0
 
LVL 44

Accepted Solution

by:
bruintje earned 200 total points
Comment Utility
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

http://support.microsoft.com/default.aspx?scid=kb;EN-US;q128185

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

:O)Bruintje
0
 

Author Comment

by:WanNing
Comment Utility
oh, thank you very much!
0
 
LVL 44

Expert Comment

by:bruintje
Comment Utility
glad i could help
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Introduction Perhaps more familiar to developers who primarily use VBScript than to developers who tend to work only with Microsoft Office and Visual Basic for Applications (VBA), the Dictionary is a powerful and versatile class, and is useful …
Entering a date in Microsoft Access can be tricky. A typo can cause month and day to be shuffled, entering the day only causes an error, as does entering, say, day 31 in June. This article shows how an inputmask supported by code can help the user a…
This video walks the viewer through the process of creating Hyperlinks for the web and other documents. Select the "Insert" tab: Click "Hyperlink":  Type "http://" followed by a web address to reference a website or navigate to a document to ref…
This video shows where to find templates, what they are used for, and how to create and save a custom template using Microsoft Word.

772 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now