+ Reply to Thread
Results 1 to 5 of 5

Open Cell Link(Bring to Front) with CommandButton on Userform

  1. #1
    Forum Contributor
    Join Date
    12-10-2008
    Location
    Austin
    Posts
    660

    Open Cell Link(Bring to Front) with CommandButton on Userform

    Hi all,

    I've got a generated link which is placed into a sheet cell of my WB.
    I need to also provide access to the file with a link on a userform through
    a command button or a generated hyperlink (Label),if that's possible.

    I am able to open with the following code using a command button.
    However, thus far have not be able to figure out how to bring the openned excel spreadsheet forward / to the front while the userform is open.

    Any help is greatly appreciated.

    Please Login or Register  to view this content.

    Thanks,

    BDB
    Last edited by bdb1974; 04-07-2011 at 10:45 AM.

  2. #2
    Forum Expert davegugg's Avatar
    Join Date
    12-18-2008
    Location
    WI, US
    MS-Off Ver
    2010
    Posts
    1,884

    Re: Open Cell Link(Bring to Front) with CommandButton on Userform

    I think this is happening because userforms are by default modal. When you open the workbook it should be brought to the front, so you shouldn't need any code to bring it to the front. Go to the userform's properties; there is a property called ShowModal. If you set that to false, your workbook should still be accessible and the newly opened workbook will go to the top.
    Is your code running too slowly?
    Does your workbook or database have a bunch of duplicate pieces of data?
    Have a look at this article to learn the best ways to set up your projects.
    It will save both time and effort in the long run!


    Dave

  3. #3
    Forum Contributor
    Join Date
    12-10-2008
    Location
    Austin
    Posts
    660

    Re: Open Cell Link(Bring to Front) with CommandButton on Userform

    Yes, this helped some.

    The openned wb is now visible over the main wb, but I still can't bring it up over
    the userform. Can I just use some code to open it into a new excel app.
    Please Login or Register  to view this content.
    Any help is appreciated.

    THanks,

    BDB

  4. #4
    Forum Expert davegugg's Avatar
    Join Date
    12-18-2008
    Location
    WI, US
    MS-Off Ver
    2010
    Posts
    1,884

    Re: Open Cell Link(Bring to Front) with CommandButton on Userform

    Yes, you can do that. I wouldn't use Excel as a variable name. Instead, I alway use xls. After you create the new Excel instance, just make it visible:

    Please Login or Register  to view this content.
    Then you will need to put xls. in front of any commands you want to run in the new instance of excel.

  5. #5
    Forum Contributor
    Join Date
    12-10-2008
    Location
    Austin
    Posts
    660

    Re: Open Cell Link(Bring to Front) with CommandButton on Userform

    Hi all,

    I found some code here at:
    http://www.ozgrid.com/forum/showthread.php?t=61588

    Ref: "Force Workbooks Open New Process"

    I simply stuck the code into the userform and put in an operation to run the
    code in succession. This brought it forward just as I needed.

    Thanks Dave for your assistance.


    BDB

+ 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