FollowHyperlink - Error 490

  • Follow



        
0
Reply Utf 2/12/2008 9:21:02 PM

Did you have a question, Bob?

If you've got code that's raising that error, what's the code?

-- 
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"Bob Barnes" <BobBarnes@discussions.microsoft.com> wrote in message 
news:1844DC59-3981-4BC4-B50D-71C2CF1151B5@microsoft.com...
> 


0
Reply Douglas 2/13/2008 12:11:00 PM


Doug - It's at another lient, but it's like the code below which works all 
but that one time, where error 490 said it was unable to open the file...but 
it opened fine manually.

Here's the code..where M, N & O are strings, Resp is a Byte
N = "C:\BobDev\M_OpTime.xls"
M = "The File " & N & vbCrLf
M = M & "Is Now Ready." & vbCrLf & vbCrLf
M = M & " Open " & Chr(34) & N & Chr(34) & " ??"
O = "Open " & Chr(34) & N & Chr(34) & " ??"
Resp = MsgBox(M, vbQuestion + vbYesNo + 0, O)
If Resp = vbYes Then Application.FollowHyperlink N, , True

TIA - Bob

"Douglas J. Steele" wrote:

> Did you have a question, Bob?
> 
> If you've got code that's raising that error, what's the code?
> 
> -- 
> Doug Steele, Microsoft Access MVP
> http://I.Am/DougSteele
> (no e-mails, please!)
> 
> 
> "Bob Barnes" <BobBarnes@discussions.microsoft.com> wrote in message 
> news:1844DC59-3981-4BC4-B50D-71C2CF1151B5@microsoft.com...
> > 
> 
> 
> 
0
Reply Utf 2/13/2008 3:26:01 PM

You positive the file name is correct?

N = "C:\BobDev\M_OpTime.xls"
M = "The File " & N & vbCrLf
M = M & "Is Now Ready." & vbCrLf & vbCrLf
M = M & " Open " & Chr(34) & N & Chr(34) & " ??"
O = "Open " & Chr(34) & N & Chr(34) & " ??"
Resp = MsgBox(M, vbQuestion + vbYesNo + 0, O)
If Resp = vbYes Then
  If Len(Dir(N)) > 0 Then
    Application.FollowHyperlink N, , True
  Else
    MsgBox "Ooops. My mistake. " & N & " doesn't exist."
  End If
End If

If that doesn't work, try

    Application.FollowHyperlink N, , NewWindow:=True

(note that's colon equal sign, not just equal sign)

-- 
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"Bob Barnes" <BobBarnes@discussions.microsoft.com> wrote in message 
news:538BEEF0-45E6-4D94-9EFC-58BB3EC289DE@microsoft.com...
> Doug - It's at another lient, but it's like the code below which works all
> but that one time, where error 490 said it was unable to open the 
> file...but
> it opened fine manually.
>
> Here's the code..where M, N & O are strings, Resp is a Byte
> N = "C:\BobDev\M_OpTime.xls"
> M = "The File " & N & vbCrLf
> M = M & "Is Now Ready." & vbCrLf & vbCrLf
> M = M & " Open " & Chr(34) & N & Chr(34) & " ??"
> O = "Open " & Chr(34) & N & Chr(34) & " ??"
> Resp = MsgBox(M, vbQuestion + vbYesNo + 0, O)
> If Resp = vbYes Then Application.FollowHyperlink N, , True
>
> TIA - Bob
>
> "Douglas J. Steele" wrote:
>
>> Did you have a question, Bob?
>>
>> If you've got code that's raising that error, what's the code?
>>
>> -- 
>> Doug Steele, Microsoft Access MVP
>> http://I.Am/DougSteele
>> (no e-mails, please!)
>>
>>
>> "Bob Barnes" <BobBarnes@discussions.microsoft.com> wrote in message
>> news:1844DC59-3981-4BC4-B50D-71C2CF1151B5@microsoft.com...
>> >
>>
>>
>> 


0
Reply Douglas 2/13/2008 3:49:23 PM

Doug - I'll be back at that Client Friday or Sunday.  I could have misspelled 
the Filename, but I thought it was OK.  I like you adding checking for the 
File..nice code to have..which I'll start using.  I usually check for the 
file's existence before running the code..

Will DEFINITELY try..
Application.FollowHyperlink N, , NewWindow:=True

...where File is coded as a string before seeing this code.
If Dir(File) = "" Then
 M = "The File " & File & vbCrLf
 M = M & "Is Not On Your PC." & vbCrLf & vbCrLf
 M = M & "You Need To Load It To Run" & vbCrLf
 M = M & "The " & cboMgmt & " Report.": MsgBox M, , "": Exit Sub
End If

Thank you - Bob

"Douglas J. Steele" wrote:

> You positive the file name is correct?
> 
> N = "C:\BobDev\M_OpTime.xls"
> M = "The File " & N & vbCrLf
> M = M & "Is Now Ready." & vbCrLf & vbCrLf
> M = M & " Open " & Chr(34) & N & Chr(34) & " ??"
> O = "Open " & Chr(34) & N & Chr(34) & " ??"
> Resp = MsgBox(M, vbQuestion + vbYesNo + 0, O)
> If Resp = vbYes Then
>   If Len(Dir(N)) > 0 Then
>     Application.FollowHyperlink N, , True
>   Else
>     MsgBox "Ooops. My mistake. " & N & " doesn't exist."
>   End If
> End If
> 
> If that doesn't work, try
> 
>     Application.FollowHyperlink N, , NewWindow:=True
> 
> (note that's colon equal sign, not just equal sign)
> 
> -- 
> Doug Steele, Microsoft Access MVP
> http://I.Am/DougSteele
> (no e-mails, please!)
> 
> 
> "Bob Barnes" <BobBarnes@discussions.microsoft.com> wrote in message 
> news:538BEEF0-45E6-4D94-9EFC-58BB3EC289DE@microsoft.com...
> > Doug - It's at another lient, but it's like the code below which works all
> > but that one time, where error 490 said it was unable to open the 
> > file...but
> > it opened fine manually.
> >
> > Here's the code..where M, N & O are strings, Resp is a Byte
> > N = "C:\BobDev\M_OpTime.xls"
> > M = "The File " & N & vbCrLf
> > M = M & "Is Now Ready." & vbCrLf & vbCrLf
> > M = M & " Open " & Chr(34) & N & Chr(34) & " ??"
> > O = "Open " & Chr(34) & N & Chr(34) & " ??"
> > Resp = MsgBox(M, vbQuestion + vbYesNo + 0, O)
> > If Resp = vbYes Then Application.FollowHyperlink N, , True
> >
> > TIA - Bob
> >
> > "Douglas J. Steele" wrote:
> >
> >> Did you have a question, Bob?
> >>
> >> If you've got code that's raising that error, what's the code?
> >>
> >> -- 
> >> Doug Steele, Microsoft Access MVP
> >> http://I.Am/DougSteele
> >> (no e-mails, please!)
> >>
> >>
> >> "Bob Barnes" <BobBarnes@discussions.microsoft.com> wrote in message
> >> news:1844DC59-3981-4BC4-B50D-71C2CF1151B5@microsoft.com...
> >> >
> >>
> >>
> >> 
> 
> 
> 
0
Reply Utf 2/13/2008 6:58:02 PM

4 Replies
954 Views

(page loaded in 0.27 seconds)

Similiar Articles:












7/28/2012 3:50:55 AM


Reply: