Public 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
Public Const SW_HIDE = 0 Public Const SW_SHOW = 5
Then this is how you use it.
result = ShellExecute(0, \"Open\", \"PathAndName\", \"\", \"Path\", SW_SHOW)
Public 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
Det hele handler om at jeg vil lave en knap i excel som køre denne fil. Denne fil eksporter nogle dataer til udklipsholderen, som jeg så kan sætte ind i excel.
hi thomas> Well up until now I thought that we were talkning Visual Basic, but now I can see its VBA. I have no idea if this works in Excel! It works in Access and Visual Basic.
I cant see why it shouldnt work in Excel though! Is it possible to debug your code see what is happening?
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.