Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Auto close read-only, question boxes?
I'm new to VB and I've written a macro that opens a second spreadsheet, pulls data, and then closes the spreadsheet. What kind of code can I put in the macro to automatically choose the "read only" option when opening the spreadsheet and then automatically not save changes made to the spreadsheet and automatically not save the data on the clipboard to use later? Any help would be appreciated. Thanks all. -- sefus12 ------------------------------------------------------------------------ sefus12's Profile: http://www.excelforum.com/member.php...o&userid=32755 View this thread: http://www.excelforum.com/showthread...hreadid=526842 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Auto close read-only, question boxes?
dim wkbk as workbook
set wkbk = workbooks.open(filename:="C:\yourfilename.xls", readonly:=true) 'do a bunch of work wkbk.close savechanges:=false You'll see a lot of options you can specify in the .Open line when you look at VBA's help. sefus12 wrote: I'm new to VB and I've written a macro that opens a second spreadsheet, pulls data, and then closes the spreadsheet. What kind of code can I put in the macro to automatically choose the "read only" option when opening the spreadsheet and then automatically not save changes made to the spreadsheet and automatically not save the data on the clipboard to use later? Any help would be appreciated. Thanks all. -- sefus12 ------------------------------------------------------------------------ sefus12's Profile: http://www.excelforum.com/member.php...o&userid=32755 View this thread: http://www.excelforum.com/showthread...hreadid=526842 -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
text boxes retaining their last value on form close and restart | Excel Discussion (Misc queries) | |||
Auto close the prompt & dialog boxes | Excel Programming | |||
Automatically Close Dialog Boxes | Excel Worksheet Functions | |||
Auto Excel workbook close: save= false during an auto subroutine | Excel Programming | |||
Question on Input Boxes and Auto-Filter | Excel Programming |