VBA for double clicking a specific cell to bring you to a different specific cell (or sheet)

doctorevii2001

New Member
I am hoping to write a VBA/macro so that when I double click on a specific cell that it brings me to a different cell (or in this case a different sheet inside the same workbook).

To elaborate I want to be able to input text into cell B3 if it's a basic answer, however if it requires more detail I want to be able to double click the cell and be taken to a second sheet which would contain the details. (for E.G. I would single click B3 and type in "see details" and then later if I double clicked that cell it would take me to my page that contains those details.

Thanks for your help! I'm just learning the basics of this stuff, so I appreciate any simple help you can offer me :)
 

Gary McMaster

Well-known Member
A hyperlink will do what you are asking. However, if you insist on doing it with VBA, how and/or where will you store the page name/address of the destination to visit when you double click "see details"?

Gary
 

doctorevii2001

New Member
A hyperlink will do what you are asking. However, if you insist on doing it with VBA, how and/or where will you store the page name/address of the destination to visit when you double click "see details"?

Gary
So the first page in my workbook is titled "General" and the second page is titled "R&D"

Column A contains various categories and column B contains "notes". In this column I want to be able to write short notes or else double click and go to a corresponding page (in this case "R&D"

So in A3 I have the category "R&D Flooring" and B3 is where I want to have a VBA (or something) to take me to the "R&D" page.

Other cells, for instance B11, need to go to a different page, titled "Gen Con," so there will be various instances where I want to double click a cell and go to a different page.

Does that all make sense?

Thanks again for the help!
 

Gary McMaster

Well-known Member
Seems like a "bookmark" hyperlink in column B is the way to go. You could also put a return to "Index" or "General" page link on the pages you visit.
 

My Aswer Is This

Well-known Member
I can write you a script so that if you double click the word "Tammy" it will take you to the sheet named "Tammy"

It would be best to tell me what sheet we can put these sheet names in.
I could have the script put all your sheet names in column (1) of sheet Named "Master" and then when you double clicked the sheet name you would be taken to that sheet.
I would need the Sheet Name to put these sheet names into.
 

doctorevii2001

New Member
Seems like a "bookmark" hyperlink in column B is the way to go. You could also put a return to "Index" or "General" page link on the pages you visit.
How does the bookmark hyperlink work? I've not done one before. If it's too lengthy to explain I can certainly google as well - I just appreciate being pointed in the right direction :)
 

doctorevii2001

New Member
I can write you a script so that if you double click the word "Tammy" it will take you to the sheet named "Tammy"

It would be best to tell me what sheet we can put these sheet names in.
I could have the script put all your sheet names in column (1) of sheet Named "Master" and then when you double clicked the sheet name you would be taken to that sheet.
I would need the Sheet Name to put these sheet names into.
The pages are:
General
Demo
General Construction
Interiors
Exteriors

There may be more added at a future date, but if you start me out with a script I can probably figure it out and add to it as I need. Currently the sheet names are written out in the following cells on the General page:

A2: Demo
A11: General Construction
A21: Interiors
A32: Exteriors

It would be helpful to have "General" written and linked on each other page so that a double click brings me back to the General page.

Thanks for the help!
 

Gary McMaster

Well-known Member
How does the bookmark hyperlink work? I've not done one before. If it's too lengthy to explain I can certainly google as well - I just appreciate being pointed in the right direction :)
Right click on the text in column "B" and select hyperlink

Select "Bookmark" on the right side of the dialog box or "Place in this document" on the left side

Select the sheet to go to from the list and type the cell to goto in the text box.

Same process for a return link.
 

doctorevii2001

New Member
Right click on the text in column "B" and select hyperlink

Select "Bookmark" on the right side of the dialog box or "Place in this document" on the left side

Select the sheet to go to from the list and type the cell to goto in the text box.

Same process for a return link.

Gotcha. This somewhat works for what I am going for, or at least I can make it, however it's not exactly what I was hoping for; I wanted to be able to type something in cell B3 if it was a short description (for eg "basic vinyl flooring"), however if it's something that needs more notes I wanted to be able to write something like "Vinyl & Hardwood, see details" and then if I'm looking at the sheet I see that, but if I double click on the cell it takes me to the page with the details on it. Does that make sense?
 

Some videos you may like

This Week's Hot Topics

  • Importing multiple excel files into one spreadsheet
    Hi, I'm trying to import multiple excel files (with the same format into a single spreadsheet) so that each day's file is listed underneath the...
  • find many based on a certain criteria
    good evening, I hope someone can help me? I have a workbook sheet 2 contains lots of data.... I would like to be able to find anything on sheet...
  • How to copy multiple rows using If
    Hi all, I'm very new to VBA and have written this simple code to copy certain cells if a certain cell within that row contains any data. I need...
  • VBA If statement
    Dear All, I have two dates, where I'd like a message box to pop, if the dates are between this criteria. [CODE] sDate1 = #10/1/2019#...
  • Text Format
    I have a sheet for user to keyin the data. The format of the data can be 451 / 1903, 0012 / 9908 or 00287 / 0099. The number after the "/" is...
  • Macro to copy values across rows and transposing them and add the user id
    [FONT=Times New Roman][SIZE=3][COLOR=#000000][/COLOR][/SIZE][/FONT][FONT=Calibri][SIZE=3][COLOR=#000000]Hi,[/COLOR][/SIZE][/FONT] [FONT=Times New...
Top