|
-
Jun 20th, 2002, 02:34 AM
#1
Thread Starter
New Member
VB function in VBA
Is it possible to use a VB function in VBA? If so how? For example I'd rather use the VB Shell function as it has more variants (thus more customisable) than the VBA Shell function. Unfortunetly I'm only using VBA for Excel so I'm stuck.
Thanks.
-
Jun 20th, 2002, 02:59 AM
#2
Addicted Member
No, this is not possible. VBA is a smaller version of VB and the main diffrence is that it lacks functionality.
You could however make a DLL that calls the VB functions with the requested paramaters, and refrence this DLL in VBA. This way you can use the VB Functions. The only minus about this construction is the loading of runtime librairies. Excel automaticly load these for VBA. But when your DLL is called the VB6 runtime files will be needed. This wil take 2 to 3 seconds extra on a bad PC.
Catch you later,
Jeroen Hoekemeijer
Code:
If 1 = 2 Then MajorError
-
Jun 20th, 2002, 06:15 AM
#3
What about the ShellExecute API?
-
Jun 20th, 2002, 06:18 AM
#4
Addicted Member
That's also an answer to the question. You could also declare the API function like you would in VB. Didn't think of that.
Catch you later,
Jeroen Hoekemeijer
Code:
If 1 = 2 Then MajorError
-
Jun 23rd, 2002, 05:47 PM
#5
Thread Starter
New Member
Thanks for the advice.
I'll try it out and see how I go.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|