+ Reply to Thread
Results 1 to 2 of 2

Auto close read-only, question boxes?

  1. #1
    Registered User
    Join Date
    03-23-2006
    Posts
    1

    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.

  2. #2
    Dave Peterson
    Guest

    Re: 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 to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1