Access9001
Registered User.
- Local time
- Yesterday, 23:24
- Joined
- Feb 18, 2010
- Messages
- 268
Re: Why does msgbox seem to change my subroutine?
Yes, same error.
Yes, same error.
Revert back to the Variant declaration (no array declaration). This is how you use the GetTitle:
PDBookmarker.GetTitle "Untitled"
I'm wondering if it isn't a TIMING issue. When you do the breakpoint and step through it, what happens if you wait 5 seconds before pressing F8 after running this line:
PDBookmarker.SetTitle (element)
I agree that it sounds like a timing issue due to asynchronous processing of the commands in the VB Code Loop. It is possible that a DoEvents command inserted in place of the MsgBox, might help to synchronize the processing in this case.
But very plausible.(I did say it was wild.)
[color=green]'Before you start this program, I suggest you save everything that wasn't saved.[/color]
Private Declare Sub mouse_event Lib "user32" (ByVal dwFlags As Long, _
ByVal dx As Long, _
ByVal dy As Long, _
ByVal cButtons As Long, _
ByVal dwExtraInfo As Long)
Private Const MOUSEEVENTF_LEFTDOWN = &H2
Private Const MOUSEEVENTF_LEFTUP = &H4
Private Const MOUSEEVENTF_MIDDLEDOWN = &H20
Private Const MOUSEEVENTF_MIDDLEUP = &H40
Private Const MOUSEEVENTF_MOVE = &H1
Private Const MOUSEEVENTF_ABSOLUTE = &H8000
Private Const MOUSEEVENTF_RIGHTDOWN = &H8
Private Const MOUSEEVENTF_RIGHTUP = &H10
Public Sub SimulateMouseClick()
[color=green]'KPD-Team 1998
'URL: http://www.allapi.net/
'E-Mail: KPDTeam@Allapi.net
'Simulate a mouseclick on the cursor's position[/color]
mouse_event MOUSEEVENTF_LEFTDOWN Or MOUSEEVENTF_LEFTUP, 0&, 0&, 0, 0
DoEvents
End Sub