Active X Web Browser

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello All,
I am working on a database that was created by a much better developer than
I. She has these lines of code on a form with an Active X Web browser
control. It works perfectly. I copied her old form using SAVE AS and copied
the code. Changed the file name to a swf file, but now the code will not
compile. Any insight? As I mentioned, it works perfectly even with the file
type change, just doesn't compile.


Private Sub Form_Current()
Dim DirectoryPath As String
DirectoryPath = "C:\intro.swf"

CurJPG = DirectoryPath

Me.WebBrowser0.Navigate CurJPG
End Sub
 
What is CurJPG ? You do not have it declared in your example code. Where
does Access stop compiling, what is the error message? You might want to
try to rem out the "CurJPG = DirectoryPath" line and change the
"Me.WebBrowser0.Navigate CurJPG" to "Me.WebBrowser0.Navigate DirectoryPath".
 
Ron,
Thank you for your suggestions. It was a situation where I tried so many
things that I confused myself. The decompile error was being executed on a
form that did not have the object Me.WebBrowser0. I fixed this and it
compiles fine, don't know how, but it works very well for what I need.
 
Back
Top