Help VB5

I need your help with my project.Problem is in the sendkey under Windows XP is all ok but under Vista write access denied 70.
Please help me.(rewritte my project)


Dim r As String

Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hWnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
Private Sub ExecuteLink(ByVal sLinkTo As String, ByVal Password As String)
Dim lRet As Long
Clipboard.SetText Password
lRet = ShellExecute(Me.hWnd, "open", sLinkTo, "", vbNull, 3)
Sleep (1500)
Sendkeys "^v", True
Sendkeys "{ENTER}", True
End Sub

Private Sub Image3_Click(Index As Integer)
Dim r

Select Case POSUN ' pdf formaty volanie z databazy
Case 11000
ExecuteLink App.path & "/Popis/SK/" & Left(DB1.Columns(0), 2) & ".pdf", "xxx"

End Sub

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!