Hyperlink Using a Variable

richciccarella

New Member
Joined
Oct 18, 2020
Messages
6
Office Version
  1. 365
Platform
  1. Windows
Hello everyone,

I have been following this forum for a while but this is my first post. I am stuck on my hyperlink code. I want the user to input data into a userform and then that data is saved in column AA2, 3, 4... on sheet userinputlist. Then it creates a sheet with its name. Then on sheet Summary, I want that name to be in A179, 180, 181... with a hyperlink to its page. When the user clicks done, it resets the form to enter a new data with the same procedure. Right now, everything works except the hyperlink is created on whatever cell its currently active on the summary sheet. and two or more inputs just overwrites the first one. This is the code I have. (I didn't include code to setup the page since its pretty long). Thank you in advance for your help.

VBA Code:
 Sheets("UserInputList").Select
    Dim EmptyLine As Long
'
'Finds the next empty line
    EmptyLine = Worksheets("UserInputList").Cells(Rows.Count, 27).End(xlUp).Row + 1

'Adds the name value
    Cells(EmptyLine, 27).Value = TextBox2.Value
'
'
'Finds the next empty line in Summary sheet
    Sheets("Summary").Select
    Dim EmptyLine3 As Long
'
    EmptyLine3 = Worksheets("Summary").Cells(Rows.Count, 1).End(xlUp).Row + 178
'Adds the name value to the empty cell
    Cells(EmptyLine3, 1).Value = TextBox2.Value
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.

Forum statistics

Threads
1,214,946
Messages
6,122,401
Members
449,081
Latest member
JAMES KECULAH

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top