dissabte, 12 de febrer de 2011

Obrir una carpeta amb Vba

Hem fet un botó anomenat
"cmdDescarregues"
que, al pulsar-lo, ens obre la carpeta
"C:\Program Files\JDOWNLOADER\"

Option Compare Database
Option Explicit

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
Const SW_NORMAL = 1

Private Sub cmdDescarregues_Click()
Call ShellExecute(Me.hwnd, "Open", "C:\Program Files\JDOWNLOADER\", &O0, &O0, SW_NORMAL)
End Sub

Cap comentari:

Publica un comentari a l'entrada