![]() |
Control box help - visual basic code
Hi, I'd like some help writing a very simple (to you all, very complex
to me) visual basic code for a control box within my excel spreadsheet. I use Excel 97. I know how to place a control box, recolour it etc but its the code I'm stuck on. I would like a user to be able to click on a control box within the spreadsheet and then for the control box to launch an Acrobat PDF document (or Word), but I've no idea how to write the code. In this example the file is called "test.pdf" or "test.doc" and is stored in "c:/excel/" Thank you very much in anticipation of your help Jon --- Message posted from http://www.ExcelForum.com/ |
Control box help - visual basic code
Private Sub CommandButton1_Click()
Shell "C:\Program Files\Adobe\Acrobat 5.0\Reader\AcroRd32.exe" & _ " c:\excel\test.pdf", 1 End Sub or if you have .pdf associated with acrobat reader: Private Sub CommandButton1_Click() Shell "Start.exe ""c:\excel\test.pdf"""" End Sub -- Regards, Tom Ogilvy "jontait " wrote in message ... Hi, I'd like some help writing a very simple (to you all, very complex to me) visual basic code for a control box within my excel spreadsheet. I use Excel 97. I know how to place a control box, recolour it etc but its the code I'm stuck on. I would like a user to be able to click on a control box within the spreadsheet and then for the control box to launch an Acrobat PDF document (or Word), but I've no idea how to write the code. In this example the file is called "test.pdf" or "test.doc" and is stored in "c:/excel/" Thank you very much in anticipation of your help Jon --- Message posted from http://www.ExcelForum.com/ |
Control box help - visual basic code
|
All times are GMT +1. The time now is 05:39 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com