+ Reply to Thread
Results 1 to 5 of 5

Going insane with NewWindow ignore

  1. #1
    Registered User
    Join Date
    04-14-2005
    Posts
    12

    Going insane with NewWindow ignore



    I have a locally saved copy of an Excel DB that I want to open from a running userform. The Excel window is hidden, due to usability and project specs. Therefore, I need to open the copy in a new Excel window, preferably ReadOnly. The problem is that the sub is ignoring the NewWindow command. I looked up one that I did in '97 (Using 2K now), and the code is almost identical. It continues to open up in the hidden Excel window, which makes it completely useless. Please Help! Am I just overlooking syntax?

    Private Sub btnShowSheet_Click()

    ActiveWorkbook.FollowHyperlink "C:\SaveFiles\LOCAL_COPY.xls", NewWindow:=True
    Application.DisplayAlerts = False

    End Sub

  2. #2
    Registered User
    Join Date
    04-14-2005
    Posts
    12

    Was thinking of another option

    I was thinking about this, and here might be another way of doing this. Is there a way that I can open the Local copy in IE? That would also make an xlReadOnly option a moot point. I can save the local copy as an html with no problem, unless I need to tell VBA to publish, but I don't know how to "Open With..." in VBA

  3. #3
    Registered User
    Join Date
    04-14-2005
    Posts
    12

    Self-serving bump

    bumpity bump

  4. #4
    Dave Peterson
    Guest

    Re: Going insane with NewWindow ignore

    I'd dump the .followhyperlink and just start another copy of excel:

    Option Explicit
    Private Sub btnShowSheet_Click()

    Dim xlApp As Application
    Set xlApp = New Excel.Application

    xlApp.Visible = True
    xlApp.Workbooks.Open Filename:="C:\my documents\excel\book1.xls", _
    ReadOnly:=True

    End Sub




    bigbri wrote:
    >
    >
    >
    > I have a locally saved copy of an Excel DB that I want to open from a
    > running userform. The Excel window is hidden, due to usability and
    > project specs. Therefore, I need to open the copy in a new Excel
    > window, preferably ReadOnly. The problem is that the sub is ignoring
    > the NewWindow command. I looked up one that I did in '97 (Using 2K
    > now), and the code is almost identical. It continues to open up in the
    > hidden Excel window, which makes it completely useless. Please Help! Am
    > I just overlooking syntax?
    >
    > Private Sub btnShowSheet_Click()
    >
    > ActiveWorkbook.FollowHyperlink "C:\SaveFiles\LOCAL_COPY.xls",
    > NewWindow:=True
    > Application.DisplayAlerts = False
    >
    > End Sub
    >
    > --
    > bigbri
    > ------------------------------------------------------------------------
    > bigbri's Profile: http://www.excelforum.com/member.php...o&userid=22213
    > View this thread: http://www.excelforum.com/showthread...hreadid=534725


    --

    Dave Peterson

  5. #5
    Registered User
    Join Date
    04-14-2005
    Posts
    12

    Thumbs up Huge help

    That worked like a charm. Thanks a million!

    I knew it could be done, but two other programmers and myself couldn't figure out the proc. Honestly, the new var is an ingenius solution. Thanks again!

+ 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