+ Reply to Thread
Results 1 to 7 of 7

lost hyperlink

  1. #1
    Forum Contributor
    Join Date
    10-01-2012
    Location
    england
    MS-Off Ver
    Excel 2016 pro
    Posts
    772

    lost hyperlink

    hi
    hyper link is working on sheetmfr and when copied to sheet2 is still there but when copied to sheetcopy that populates a userform its gone
    how can i get it to populate the userform1,there will be numerous hyperlinks when its finished
    thanks
    Attached Files Attached Files

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2404
    Posts
    24,758

    Re: lost hyperlink

    You have provided your file, which is great, but your description doesn't tell me where to look in your code. Where in your code are you trying to "populate a userform"? I do not see where you are pasting anything in sheetcopy.

    The other issue may be an understanding of how hyperlinks work. Are you trying to put a hyperlink on a userform somehow? Where do you want that hyperlink to do? Form controls do not support hyperlinks, but you can write code that makes them behave as if they were hyperlinks.

    I would need a little more information about just what you are trying to do, and what in your code is not doing what you want it to do.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Forum Contributor
    Join Date
    10-01-2012
    Location
    england
    MS-Off Ver
    Excel 2016 pro
    Posts
    772

    Re: lost hyperlink

    hi thanks for reply
    this is the code that populates userform1 the one that does not inc the hyperlink
    hope this is what you meant , also keeps telling me out of memory when shutting down not sure what all thats about, obviously you prob realise that im not very good with programming
    cheers colin
    Please Login or Register  to view this content.
    Last edited by vlady; 11-22-2012 at 10:19 PM. Reason: code tags

  4. #4
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2404
    Posts
    24,758

    Re: lost hyperlink

    This code does not populate a userform, it populates a worksheet using values in textboxes on the userform. I do not see how hyperlinks play any role in this.

    Before going any further please review the forum rules. Rule 3 says that it is requires to tag code in a post. See my signature as well as the rule:

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code. Posting code without them makes your code hard to read and difficult to be copied for testing. Highlight your code and click the # at the top of your post window. For more information about these and other tags, found here

  5. #5
    Forum Contributor
    Join Date
    10-01-2012
    Location
    england
    MS-Off Ver
    Excel 2016 pro
    Posts
    772

    Re: lost hyperlink

    hi
    have looked up rules have got the idea now thanks
    understand what you mean now with userform1 taking values from sheetcopy you are right
    hyperlinks come in to it like this when i have picked a crane size thats needed it will give me a liftplan no lets say liftplan50
    when userform1 is populated i need some sort of link to these plans which will be stored on my c drive ,i have tried to put another listbox on userform1 with the full address of the link but will not work although they work now in both worksheets
    hope this clarifies it a bit, i might have done it the wrong way with 2 forms but i want to make it so no one can alter it and looks visually easy for others to use
    many thanks colin

  6. #6
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2404
    Posts
    24,758

    Re: lost hyperlink

    Let's talk about how hyperlinks work. In an Excel worksheet cell, there is a value that is displayed, and there can be a hyperlink associated with it. The hyperlink is a completely independent thing from what's displayed. If you right-click on a cell with a hyperlink and select "Edit hyperlink" you can edit the URL (address) where the hyperlink goes. If you type a URL into a cell, Excel automatically says, "Hey, this guy's entering a hyperlink so I'll take care of it for him."

    On a userform, controls can't act as hyperlinks like cells do. Just because you put a URL in it, it does not become a hyperlink. In fact they don't have a "hyperlink" attribute at all like a cell does. If you want a user to be able to click on a control and then go to that file, you have to create it all as custom code in VBA. You have to write code that detects when the user clicks on it, reads the address, and opens the file (I have never written code like that for a non-Excel file so I'm not sure what it would look like).

    All this being said I still don't understand how you want this to work. You have two userforms and four worksheets and I don't understand what is relationship among them all and how the workflow goes. You seem to have spent a lot of effort on data layout and form presentation but there seems to be some confusion about the flow. Suppose I am a user and I open this up for the first time. What do I do, step by step? At what point do I want to click a hyperlink to open the plan? What do I click for that? How does Excel know what the file name is for that plan?

    One last thing, on userform1 you use a lot of listboxes but they are all linked to only one value and they only show one value at a time. Maybe you really want to use textboxes there?

  7. #7
    Forum Contributor
    Join Date
    10-01-2012
    Location
    england
    MS-Off Ver
    Excel 2016 pro
    Posts
    772

    Re: lost hyperlink

    hi
    would like this to work like this
    click search button on sheetmfr which brings up userform mfr
    enter say 100 in location box and press search which brings up 3 instances of plans in unit 100 in listbox below
    i want to be able to double click the middle one so it populates the boxes above
    the problem i have is this sends all 3 instances to sheet2 where i only want the one sending there that is why i have sheetcopy
    the one i double click on gets sent to there instead
    then i call userform 1 and populate it from sheetcopy
    i wanted to be able to click on liftplan no in userform1 which would bring up the drawing for liftplan 50
    i thought this would be hyperlinked
    hope this clarifies a little ive prob got more sheets than i need but it was the only way i knew to do it
    regards colin

+ 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