• WSHoratio64

    WSHoratio64

    @wshoratio64

    Viewing 3 replies - 1 through 3 (of 3 total)
    Author
    Replies
    • in reply to: Drop Down in Excel (Excel 2000) #624664

      This is close. I will work with it. Here is a simplified version of the worksheet.

    • in reply to: Drop Down in Excel (Excel 2000) #624059

      I continue to struggle with this. I am kind of surprised since this seems to be such a standard feature in Java but few folks use Excel as a reference sheet to jump around in. The hyperlinks in this case are actually bookmarks. Since bookmarks are treated much as URL’s are in creating links for Excel documents, I figured I could use the same or similar language to use the drop down box.

      “Ankle” is bookmarked for cell B793.
      “Arm” is bookmarked for cell B259
      “Cervical_Back” is bookmarked for B435
      etc.

      There are bunch others but I am can replicate the formula once I have statement which works. Maybe I should put the ActiveSheet.Hyperlinks.Add in the UserForm_Initialize() module to add the names and the hyperlinks to the combo box.

      I tried the following:

      Select Case ComboBox1.Value
      Case 0 ‘ First case
      CommandButton1.Caption = “Ankle”
      Range(“b793”).Hyperlinks(“Ankle”).Follow
      Range(“b793”).Select
      ‘ other choices to follow

      end select
      end sub

      I cannot seem to get the drop box to take me to cell B793 when I click on ankle in the dropdown box. I must be missing something obvious.

    • in reply to: Drop Down in Excel (Excel 2000) #623077

      I can get the drop down to work but when I click on the choice in the drop down it will not hyperlink me with the object. I think VBA is the only way to have the hyperlink to execute on the click from the drop down box. But if you have another way, I would love to hear it. Given the size of the data, I want to go to the data. Not the other way around which seems the primary purpose of the standard dropdown in Excel. Here is the code I have been working with.

      Private Sub UserForm_Initialize()
      ComboBox1.AddItem “Ankle”
      ComboBox1.AddItem “Arm”
      ComboBox1.AddItem “Cervical Back”
      End Sub

      Private Sub ComboBox1_Change()

      ComboBox1.DropDown

      Select Case ComboBox1.Value
      Case 0 ‘Left Top
      CommandButton1.Caption = “Ankle”

      Worksheets(“July 2001 Surgical Estimates”).Range(“v3”).Hyperlinks(1).Follow ‘tried this
      Worksheets(1).Range(“v3”).Hyperlinks.Item(1).Follow NewWindow:=False, AddHistory:=True ‘ tried this
      Range(“b793”).Select ‘tried this

      Case 1
      CommandButton1.Caption = “Arm”
      Range(“b793”).Select

      Case 2
      CommandButton1.Caption = “Cervical Back”
      Range(“b793”).Select

      End Select
      End Sub

    Viewing 3 replies - 1 through 3 (of 3 total)