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

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
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,223,911
Messages
6,175,324
Members
452,635
Latest member
laura12345

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