Forum Discussion
Michael1105
Jul 01, 2022Brass Contributor
Form Control Buttons to Take me to a specific areas of a worksheet.
Hello, I'm hoping someone can help. I'm looking to place forms control buttons, that when clicked, will take the viewer to an area of a worksheet. For example: I have a large report that I s...
NikolinoDE
Jul 02, 2022Gold Contributor
Here are three small VBA examples that you can use, depending on what you intend to do.
‘ 1. Button with VBA & Hyperlink:
Private Sub CommandButton1_Click()
ActiveWorkbook.FollowHyperlink Address:="https://www.Nikolino.de", NewWindow:=True
End Sub
‘ 2. Button with VBA form control
Sub ButtonClick ()
Worksheets("Sheet1").Select
End Sub
‘ 3. Button with VBA Active X control
Private Sub CommandButton1_Click()
Application.Goto Sheets("Sheet1").Range("C25")
End Sub
As a VBA alternative, formatting a cell to look like a button and then pasting the hyperlink into the cell would be the most elegant solution and save resources. But that also depends on your plans.
Hope I was able to help you :).
I know I don't know anything (Socrates)
Was the answer useful? Mark them as helpful!
This will help all forum participants.
Michael1105
Jul 21, 2022Brass Contributor
Hello, NikolinoDE,
I apologize for the delay in responding. I haven't had a chance to review the information but I will try what you've suggested today.
Thank you so very much for your help!
I apologize for the delay in responding. I haven't had a chance to review the information but I will try what you've suggested today.
Thank you so very much for your help!