View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.programming
Stopher Stopher is offline
external usenet poster
 
Posts: 67
Default Linking a VBA button to Excel cell


beginner here wrote:
Thanks for the additional help, but I'm stilling getting an error. This time
it is saying: Invalid procedure call or argument

So here is my present code with the changes:

Shell ("C:\Program Files\Adobe\" & Range("F4") & ".pdf")

Steve


Dim newpath as String, sStr as String
newpath = "C:\Program Files\Adobe\"
sStr = ("cmd /c " & newpath & Range("F4") &".pdf"

Call Shell(sStr, vbNormalFocus)

Stole this out of a post by Tom and adopted it for your instance.