View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default 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/