+ Reply to Thread
Results 1 to 1 of 1

Open a Userform via a Hyperlink

  1. #1
    Forum Contributor
    Join Date
    09-11-2008
    Location
    uk
    MS-Off Ver
    2010; 2016
    Posts
    390

    Open a Userform via a Hyperlink

    Well...nearly finished my project, but can't seem to get this piece of code to work.....so need your help again!

    The following piece of code works really well, apart from the second instance, which is coloured red.....

    Sub links()
    Dim ws As Worksheet

    For Each ws In ThisWorkbook.Worksheets
    If ws.Name = "TOC" Or ws.Name = "Clean" Then 'Do nothing for the TOC sheet.
    Else
    ws.Hyperlinks.Add Anchor:=ws.Range("A10"), Address:="", SubAddress:="TOC!A1", TextToDisplay:="Go to Index"
    ws.Hyperlinks.Add Anchor:=ws.Range("A12"), Address:="", SubAddress:="TOC!A1", TextToDisplay:="Change Name"
    End If
    Next
    End Sub
    What I would really like to do is to adapt that particular line so that it would open a userform called UFKeyboard when the hyperlink generated by the code in all sheets except TOC and Clean is pressed. Please can somebody help!!!
    Last edited by skyping; 03-15-2012 at 08:34 AM.

+ 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