Help VB5 - Programmers Heaven

Howdy, Stranger!

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


Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

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.