Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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/ |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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/ |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Visual Basic Code hidden | Excel Discussion (Misc queries) | |||
Visual Basic code | Excel Discussion (Misc queries) | |||
I need a visual basic code....please | Excel Discussion (Misc queries) | |||
Visual Basic Code | Excel Programming | |||
Visual Basic Code in Excel | Excel Programming |