: : : you'll want to do something like this
: : :
: : :
Private Sub Command2_Click()
: : : Dim RetVal
: : : RetVal = Shell("C:\Program Files\Adobe\Acrobat 7.0\Reader\AcroRd32.exe " & Text1.Text, vbMaximizedFocus)
: : : End Sub
: : :
: : : to open the location that's in
Text1.Text
: : :
: :
: : One warning, you want to be careful in 'hard-coding' and assuming the path for where acrobat [or any windows program] is installed.
: : What happens if the user did not install acrobat in the default \Program files\ folder? By checking the registry you will be sure of the install path.
: :
: :
:
: well the best way to do it would be to use the ShellExecute API to launch to pdf. that way, whichever default application is set to be a pdf reader will open it, but the OP didn't sound like he was ready to get into API yet. it made more sense just to show him how to concatenate strings.
:
Thanks but i got a bit of code linking to a database so the user can change the location if they need to