How to enter a hyperlink into a user form to pass it ointo my worksheet

Adam78678

New Member
Joined
Dec 16, 2021
Messages
2
Office Version
  1. 365
Platform
  1. Windows
0
1
I have a link to options in Think or Swim
from my worksheet
I have a form that I'm using to enter values into this sheet and for the textbox "tbossot" I'm using this code to copy to the worksheet:

VBA Code:
Cells(lrow + 1, "R").Formula = "='" & tbossot.Value & "'!"

but when I paste this link into my form, it gets pasted as .MSFT211217C345, without the link (ie no blue font or underline) and I get an application defined or object defined error and nothing gets put into Cells(lrow,"R"),

Extra Clarification
ThinkorSwim on their website have a link for each strike price in the options chain, so for example if this one is for Microsoft at 345, it will liik like this: .MSFT211217C345, if I copy that to a cell in the worksheet, "R7", it will show up as a blue underline link in my worksheet at "R7", once I have that I can set cell "R8" to fill in the strike price by putting "RTD("tos.rtd",,"STRIKE",R7))" into that, and set cell "R9" like this " RTD("tos.rtd",,"LAST",R7)" to give me the current price of the option . To make the initial entry of all the prices and other info easier, I set up a form, on which one of the text boxes is named "tbossot". It is into that box that I would like to paste the hyperlink from the website, and then have it go into cell "R7". However when I do that , all I get is the plain text of " .MSFT211217C345" which does not connect to anything. So pasting it into the cell of the worksheet directtly works great, but pasting it into the UserForm does not work.
So my question is what code would transfer it from the UserForm to the sheet, so I would get it into the sheet as a link. I know that one answer is to just paste it directly into the worksheet, but there are many cells in that worksheet, and getting it into the right one is easier when I use the form, especially as there are several other entries that need to be added to the worksheet from the form. Hope this makes my question a bit clearer (or maybe more opaque). Any help would again be greatly appreciated.
 

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)

Forum statistics

Threads
1,224,822
Messages
6,181,165
Members
453,021
Latest member
Justyna P

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