Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am writing a macro that needs to open another file that is password
protected in "Read Only", copy a sheet into my current file and close the file I am copying from. How do I write the string to select "Read Only" from the password window? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Workbooks.Open Filename:="C\Text.xls", ReadOnly:=True, _ Password:="MyPassword"
-- HTH... Jim Thomlinson "iashorty" wrote: I am writing a macro that needs to open another file that is password protected in "Read Only", copy a sheet into my current file and close the file I am copying from. How do I write the string to select "Read Only" from the password window? |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
If you want to open the file in read-only mode, ReadOnly is one of the
options for the Workbooks.Open method: Workbooks.Open Filename:="D:\Data\book1.xls", _ Password:="abc", ReadOnly:=True If you meant that the workbook was save with the read-only recommnded option, you can tell Excel not to display the read-only recommended message: Workbooks.Open Filename:="D:\Data\book1.xls", _ Password:="abc", IgnoreReadOnlyRecommended:=True Hope this helps, Hutch "iashorty" wrote: I am writing a macro that needs to open another file that is password protected in "Read Only", copy a sheet into my current file and close the file I am copying from. How do I write the string to select "Read Only" from the password window? |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks Jim. It worked beautifully.
"Jim Thomlinson" wrote: Workbooks.Open Filename:="C\Text.xls", ReadOnly:=True, _ Password:="MyPassword" -- HTH... Jim Thomlinson "iashorty" wrote: I am writing a macro that needs to open another file that is password protected in "Read Only", copy a sheet into my current file and close the file I am copying from. How do I write the string to select "Read Only" from the password window? |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks, Tom. Indeed it was the first item.
"Tom Hutchins" wrote: If you want to open the file in read-only mode, ReadOnly is one of the options for the Workbooks.Open method: Workbooks.Open Filename:="D:\Data\book1.xls", _ Password:="abc", ReadOnly:=True If you meant that the workbook was save with the read-only recommnded option, you can tell Excel not to display the read-only recommended message: Workbooks.Open Filename:="D:\Data\book1.xls", _ Password:="abc", IgnoreReadOnlyRecommended:=True Hope this helps, Hutch "iashorty" wrote: I am writing a macro that needs to open another file that is password protected in "Read Only", copy a sheet into my current file and close the file I am copying from. How do I write the string to select "Read Only" from the password window? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Convert numbers to date: "586" to read "May 1986" | Excel Worksheet Functions | |||
Read ".dll" files, the Macro "work flow" and the actual values of the variables when Macro is running | Excel Programming | |||
Solution "Your changes could not be saved" "The document may be read-only or encrypted" | Excel Discussion (Misc queries) | |||
Using "Cells" to write "Range("A:A,H:H").Select" | Excel Programming | |||
The instruction at "0x65255ac9" referenced memory at "0x00000008". The memory could not be read. Clikc OK to terminate etc | Excel Programming |