hejsa.
Gør nogenlignede det her
Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal
lngHWnd As Long, ByVal lpszOp As String, ByVal lpszFile As String, ByVal
lpszParams As String, ByVal lpszDir As String, ByVal FsShowCmd As Long) As
Long
Declare Function GetDesktopWindow Lib "user32" () As Long
Public Function OpenDocument(ByVal strCompletePath As String) As Long
Dim lngHDC As Long
Dim lngReturn As Long
If strCompletePath <> "" Then
lngHDC = GetDesktopWindow()
lngReturn = ShellExecute(lngHDC, "Open", strCompletePath, "", "C:\",
SW_SHOWNORMAL)
If lngReturn <= 32 Then Err.Raise vbObjectError + lngReturn,
App.Title, "Could not open document " & strCompletePath
End If
OpenDocument = lngReturn
End Function
--
Thomas R - Developer DK
"Danlamp Teknik" <danlamp@danlamp.dk> wrote in message
news:9lqk8h$ldc$1@sunsite.dk...
> Hejsa
> Jeg har en Access db, som jeg gerne ville kunne åbne ved eks. at trykke på
> en knap på min VB form.
>
> Lidt lige som når man åbner en txt fil, men det skal være en *.mdb fil.
>
>
|