HELP: Inserting an HTML code as text into VBA

Teeks2k

New Member
Joined
Aug 1, 2017
Messages
20
Hello,

I am writing a macro to build a template that will be uploaded into another program and I am having some problems with this one bit:

Code:
For i = 1 To LR
With FN_Upload
        Sheets(3).Range("A" & i + 1).Copy Destination:=FN_Upload.Range("D" & i + 1)
        .Range("A" & i  + 1).Value = "ADD"
        .Range("B" & i + 1).Value = 10488
        .Range("C" & i + 1).Value = 2
        .Range("E" & i + 1).Value = 3
        .Range("F" & i + 1).Value = 3
        .Range("G" & i + 1).Value = "Click <a href="https://yaddayaddayadda.com"> here </a> for Listing." 
End With
Next

The rest of the code works fine except for the last column where I try to add the HTML hyperlink code. The intent is for column G to show that string as text for the other program to read.

Thanks!
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
What exactly is the problem?

Are you using single or double quotes for the href attribute in the HTML code?
 
Upvote 0
If this is for HTML try using single quotes.
 
Upvote 0

Forum statistics

Threads
1,224,824
Messages
6,181,187
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

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