Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Viewing worksheets/workbooks

Hi all,

I would be grateful for any help on the following. I am a revelently
new user of VB in Excel.
I would like to use a form to open a particular part of a worksheet,
either a worksheet in the active workbook or another one, the data in
the particular worksheet could then be viewed or printed but not
edited. I would then like to add a command button to the worksheet to
close the worksheet and/or workbook and return to the form.
I am reasonably confident about adding the button to close the
workbook/worksheet but have no clue as to opening the
workbook/worksheet and restricting it to viewing.

Thanks in advance for any help


---
Message posted from http://www.ExcelForum.com/

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 31
Default Viewing worksheets/workbooks

Workbook.Open(FileName, UpdateLinks, ReadOnly, Format, Password,
WriteResPassword, IgnoreReadOnlyRecommended, Origin, Delimiter, Editable,
Notify, Converter, AddToMRU)
expression Required. An expression that returns a Workbooks or RecentFile
object.

FileName Required String. The file name of the workbook to be opened.

UpdateLinks Optional Variant. Specifies the way links in the file are
updated. If this argument is omitted, the user is prompted to specify how
links will be updated. Otherwise, this argument is one of the values listed
in the following table.

Value Meaning
0 Doesn't update any references
1 Updates external references but not remote references
2 Updates remote references but not external references
3 Updates both remote and external references


If Microsoft Excel is opening a file in the WKS, WK1, or WK3 format and the
UpdateLinks argument is 2, Microsoft Excel generates charts from the graphs
attached to the file. If the argument is 0, no charts are created.

ReadOnly Optional Variant. True to open the workbook in read-only mode.

Format Optional Variant. If Microsoft Excel is opening a text file, this
argument specifies the delimiter character, as shown in the following table.
If this argument is omitted, the current delimiter is used.

Value Delimiter
1 Tabs
2 Commas
3 Spaces
4 Semicolons
5 Nothing
6 Custom character (see the Delimiter argument)


Password Optional Variant. A string that contains the password required to
open a protected workbook. If this argument is omitted and the workbook
requires a password, the user is prompted for the password.

WriteResPassword Optional Variant. A string that contains the password
required to write to a write-reserved workbook. If this argument is omitted
and the workbook requires a password, the user will be prompted for the
password.

IgnoreReadOnlyRecommended Optional Variant. True to have Microsoft Excel
not display the read-only recommended message (if the workbook was saved
with the Read-Only Recommended option).

Origin Optional Variant. If the file is a text file, this argument
indicates where it originated (so that code pages and Carriage Return/Line
Feed (CR/LF) can be mapped correctly). Can be one of the following
XlPlatform constants: xlMacintosh, xlWindows, or xlMSDOS. If this argument
is omitted, the current operating system is used.

Delimiter Optional Variant. If the file is a text file and the Format
argument is 6, this argument is a string that specifies the character to be
used as the delimiter. For example, use Chr(9) for tabs, use "," for commas,
use ";" for semicolons, or use a custom character. Only the first character
of the string is used.

Editable Optional Variant. If the file is a Microsoft Excel 4.0 add-in,
this argument is True to open the add-in so that it's a visible window. If
this argument is False or omitted, the add-in is opened as hidden, and it
cannot be unhidden. This option doesn't apply to add-ins created in
Microsoft Excel 5.0 or later. If the file is an Excel template, True to open
the specified template for editing. False to open a new workbook based on
the specified template. The default value is False.

Notify Optional Variant. If the file cannot be opened in read/write mode,
this argument is True to add the file to the file notification list.
Microsoft Excel will open the file as read-only, poll the file notification
list, and then notify the user when the file becomes available. If this
argument is False or omitted, no notification is requested, and any attempts
to open an unavailable file will fail.

Converter Optional Variant. The index of the first file converter to try
when opening the file. The specified file converter is tried first; if this
converter doesn't recognize the file, all other converters are tried. The
converter index consists of the row numbers of the converters returned by
the FileConverters property.

AddToMru Optional Variant. True to add this workbook to the list of
recently used files. The default value is False.




"CWalsh " wrote in message
...
Hi all,

I would be grateful for any help on the following. I am a revelently
new user of VB in Excel.
I would like to use a form to open a particular part of a worksheet,
either a worksheet in the active workbook or another one, the data in
the particular worksheet could then be viewed or printed but not
edited. I would then like to add a command button to the worksheet to
close the worksheet and/or workbook and return to the form.
I am reasonably confident about adding the button to close the
workbook/worksheet but have no clue as to opening the
workbook/worksheet and restricting it to viewing.

Thanks in advance for any help


---
Message posted from http://www.ExcelForum.com/



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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Viewing multiple worksheets rmellison Excel Discussion (Misc queries) 4 May 13th 10 02:51 PM
Viewing linked workbooks juliejg1 Excel Discussion (Misc queries) 4 June 18th 08 03:27 PM
Viewing the worksheets Ropesend Excel Discussion (Misc queries) 3 February 5th 08 06:07 PM
Viewing multi worksheets Faust57 New Users to Excel 2 June 28th 06 06:05 PM
Viewing workbooks Margie Excel Discussion (Misc queries) 2 January 25th 06 04:02 PM


All times are GMT +1. The time now is 01:56 PM.

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"