-
Msgbox and Functions
I have 2 questions.
1) Is there a way to add buttons and chang the display name of them to a messagebox? Is so is there a way to add multiple "custom named" buttons to a messagebox?
What I want to do is show the user a message and give then 3 options to choose from each doing something different.
2) How do you return something from a function? I can do it in VB.Net but is there a way to do it in vba?
-
1) AFAIK there is no way to customise the buttons in a messagebox - you would need to create a user form for this purpose that you can customise to your heart's content.
2) You return something from a function by giving the function a value. For example,
[vba]
Function MyMessage() As String
' code here
...
MyMessage = "This is my message"
End Function[/vba]
You declare the function as a type in the same way as a variable, and the value you set for your function needs to correspond to the type set.
-
Oh aiight. Thanks alot. Seems like i misssed the move obivious.
-
1) Here's a link http://www.xcelfiles.com/API_11.html which shows
that someone has managed it. Not easy to do though.
Marcster.
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