>I am attempting to run the following in VBScript
>
>If Left(TransRef,5)="00000"
>And Len(TransRef)=10 Then
>MsgBox ("Not an Invoice")
>Else
>ActiveWorkbook.FollowHyperlink
>Address:="C:\pdfscan\0000030525.pdf",_NewWindow:=True
>End If
>
>The "Active Workbook.FollowHperlink" etc function does not
>appear to be recognised in VBScript-is there a replacment?
>
>Thanks in advance for any help.
>
>ian
>
>.
>
open file in vbscript
Moderators: Dorian (MJT support), JRL
Hi,
You need to specify the object to which ActiveWorkbook is a property. My guess is this is an Excel property. Therefore you will need to create the Excel object and prefix your ActiveWorkbook call with the object variable.
You need to specify the object to which ActiveWorkbook is a property. My guess is this is an Excel property. Therefore you will need to create the Excel object and prefix your ActiveWorkbook call with the object variable.
MJT Net Support
[email protected]
[email protected]