Is It Possible to add HTML Button Link in excel spreadsheet

brad2157

New Member
Joined
Nov 21, 2005
Messages
43
I am working on a workbook for collectors and wanted to add a PAYPAL donation button to the first spreadsheet of the workbook. I went through paypal and set up my information to create a html button. I have all the code I need to make the button, but it wont allow me to add the full code in a hyperlink. I would really like to have a button displayed to click on, but if not, I can deal with just a hyperlink from the text.

*****Thanks a lot all of the people that have helped me with all my questions so far, you guys are very very knowledgable and very quick as well. THANKS AGAIN!!*****
 

Some videos you may like

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.

ndendrinos

Well-known Member
Joined
Jan 17, 2003
Messages
1,694
Hello Brad ... not sure about this Papal button you refer to.
I use buttons in some of my sheets and I hyperlink them to websites by right clicking on the button and choosing "hyperlink" and I type the website address I want to link to.
Assuming that the Paytpal button is somehow restrictive can't you just use the address of the site where presumably one would have to go to in order to make his/her donation by typing a credit card number and amount etc... ?
Just an idea.
 

erik.van.geit

MrExcel MVP
Joined
Feb 1, 2003
Messages
17,832
hello,
if you mean you want to go to a webpage just clicking on a button, then try this
Code:
Option Explicit

Sub goto_webpage()
Dim WSh As Object

Set WSh = CreateObject("WScript.Shell")
WSh.Run "www.address.com"

End Sub
kind regards,
Erik
 

brad2157

New Member
Joined
Nov 21, 2005
Messages
43
heres the code I am trying to add to the button:
_______________________________________________________________________
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="image" src="https://www.paypal.com/en_US/i/btn/x-click-but21.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!">
<input type="hidden" name="encrypted" value="-----BEGIN PKCS7-----MIIHXwYJKoZIhvcNAQcEoIIHUDCCB0wCAQExggEwMIIBLAIBADCBlDCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLj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kiG9w0BCQQxFgQUCOn4r7SK988eOjDjkbiBn79DEuwwDQYJKoZIhvcNAQEBBQAEgYC6zYvQU85o3KAM0G9JTHNGsfFXIZ/KpcNt2gbxbfnlJ+/niYd8r9tq7OlA3rpGhev/et7q6uWRC9TKQVySwjIDZNN6rk0PdyGqpxSOssAbXdso1YyBMzyGbo53LPRuQkPvKxq6CiGhoiRi3M9w06We/ddV7ScwQNGdMvlYlNxOpQ==-----END PKCS7-----
">
</form>
_______________________________________________________________________

This is the code I got from paypal. If this was on a normal webpage, once you clicked the button it would direct you to paypal's website and autodatafill a few fields. All the person making a donation would have to do is to simply enter in a dollar amount. The rest would be datafilled for them. I hope this isnt too confusing.
 

brad2157

New Member
Joined
Nov 21, 2005
Messages
43

ADVERTISEMENT

well I cant get the actual typed out code to display in the forum without it showing the actual button I am trying to create. Anyways, if you click that button, thats what I need it to do. It directs you to paypal's website and has everything datafilled. If I could just paste this code into a cell or attach it to a button in excel and get it to do this very thing, then I would be good to go.
 

brad2157

New Member
Joined
Nov 21, 2005
Messages
43
heres the code...I had to swap a few characters around..such as replacing a < with a > to get it to show up. I hope this helps out.
------------------------------------------------------------------------------------
>form action="https://www.paypal.com/cgi-bin/webscr" method="post"<
>input type="hidden" name="cmd" value="_s-xclick"<
>input type="image" src="https://www.paypal.com/en_US/i/btn/x-click-but21.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!">
>input type="hidden" name="encrypted" value="-----BEGIN PKCS7-----MIIHXwYJKoZIhvcNAQcEoIIHUDCCB0wCAQExggEwMIIBLAIBADCBlDCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHDAaBgkqhkiG9w0BCQEWDXJlQHBheXBhbC5jb20CAQAwDQYJKoZIhvcNAQEBBQAEg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7OlA3rpGhev/et7q6uWRC9TKQVySwjIDZNN6rk0PdyGqpxSOssAbXdso1YyBMzyGbo53LPRuQkPvKxq6CiGhoiRi3M9w06We/ddV7ScwQNGdMvlYlNxOpQ==-----END PKCS7-----
">
>\form<
------------------------------------------------------------------------------------
 

Yogi Anand

MrExcel MVP
Joined
Mar 12, 2002
Messages
11,454
Hi brad2157:

You can have "<" correctly display on the board by wrappint the code lines in code and \code enclosed in square brackets [ and ]
Code:
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
 

brad2157

New Member
Joined
Nov 21, 2005
Messages
43
Here is the code I am trying to get to work in my excel workbook.


Code:
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="image" src="https://www.paypal.com/en_US/i/btn/x-click-but11.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!">
<input type="hidden" name="encrypted" value="-----BEGIN PKCS7-----MIIHRwYJKoZIhvcNAQcEoIIHODCCBzQCAQExggEwMIIBLAIBADCBlDCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHDAaBgkqhkiG9w0BCQEWDXJlQHBheXBhbC5jb20CAQAwDQYJKoZIhvcNAQEBBQAEgYB86U/MoqejEBnPSm0pMkuG7vILLBJS5/gRs/8M7E+TSCXBkwFr4h9o/FmdLX1HX1BKaaQ1dKPO21dBrarvaVNqofCvaa/5hLTmnSCD5LtmxjTfb8pEgV5jGKt9Px4vaVTaD1XOQbxvQI38yU3hKHN2bxRCGHwxtd+tNtTGBHObdDELMAkGBSsOAwIaBQAwgcQGCSqGSIb3DQEHATAUBggqhkiG9w0DBwQIW2EnEt7lWmOAgaBlAW6ps1ZkFknW4WOZ+TFcqUwXrCWGX4uItsgeR/bl5B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jETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHDAaBgkqhkiG9w0BCQEWDXJlQHBheXBhbC5jb22CAQAwDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQUFAAOBgQCBXzpWmoBa5e9fo6ujionW1hUhPkOBakTr3YCDjbYfvJEiv/2P+IobhOGJr85+XHhN0v4gUkEDI8r2/rNk1m0GA8HKddvTjyGw/XqXa+LSTlDYkqI8OwR8GEYj4efEtcRpRYBxV8KxAW93YDWzFGvruKnnLbDAF6VR5w/cCMn5hzGCAZowggGWAgEBMIGUMIGOMQswCQYDVQQGEwJVUzELMAkGA1UECBMCQ0ExFjAUBgNVBAcTDU1vdW50YWluIFZpZXcxFDASBgNVBAoTC1BheVBhbCBJbmMuMRMwEQYDVQQLFApsaXZlX2NlcnRzMREwDwYDVQQDFAhsaXZlX2FwaTEcMBoGCSqGSIb3DQEJARYNcmVAcGF5cGFsLmNvbQIBADAJBgUrDgMCGgUAoF0wGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkqhkiG9w0BCQUxDxcNMDUxMTI1MTUwOTM4WjAjBgkqhkiG9w0BCQQxFgQU9mivlk1n9BMDxjv1j3DVnnelNFswDQYJKoZIhvcNAQEBBQAEgYCJbPFp1xBZ0xVElkxwEfrsspJ5hqcQGWY68PUPCG1Pr5GDVmx6DYKBA3otZR7FUY2P6UMdV49LXhRZw+hDx3p+6iVJj1Hrjrnrtqc4U3Yc4A9gGqI5ZSR5jBaCnqEKZ3DsnqwtZ9IgW6AgccmhFHuQ+V+yI3TGhBu1mJyog/WeiQ==-----END PKCS7-----
">
</form>
 

Watch MrExcel Video

Forum statistics

Threads
1,118,167
Messages
5,570,636
Members
412,334
Latest member
ExcelForLifeDontHate
Top