-
Jan 31st, 2017, 02:00 PM
#1
Thread Starter
New Member
[RESOLVED] [Access] Hebrew letters in Msgbox()
Hi,
Is there any possibility to show Hebrew characters in a VBA Msgbox()
Thanks for your help
-
Jan 31st, 2017, 03:28 PM
#2
Re: [Access] Hebrew letters in Msgbox()
you should do a search for unicode messagebox, i am not sure if it would be a windows API call or a 3rd party control, but i am sure it would exist
i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next
dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part
come back and mark your original post as resolved if your problem is fixed
pete
-
Jan 31st, 2017, 03:33 PM
#3
Thread Starter
New Member
Re: [Access] Hebrew letters in Msgbox()
Originally Posted by westconn1
you should do a search for unicode messagebox, i am not sure if it would be a windows API call or a 3rd party control, but i am sure it would exist
Thanks for your reply.
I found this:
https://answers.microsoft.com/en-us/...6-95af5f29e324
But i'm looking if there is something more simple.
Last edited by VBA newbie; Feb 2nd, 2017 at 01:41 PM.
-
Jan 31st, 2017, 03:34 PM
#4
Thread Starter
New Member
Re: [Access] Hebrew letters in Msgbox()
-
Feb 1st, 2017, 05:35 AM
#5
Re: [Access] Hebrew letters in Msgbox()
unless you can find something that has already been done by someone else, which they probably want to charge for, you are probably stuck with similar amounts of code
you can probably just put the whole code into a module, which you can then just add to any project
in your code, just call like
MsgBoxW with the normal parameters for standard msgbox, no need to edit the code unless some issue like application.name will cause an error, you could easily change to app.exename or similar
i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next
dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part
come back and mark your original post as resolved if your problem is fixed
pete
-
Feb 1st, 2017, 02:35 PM
#6
Thread Starter
New Member
Re: [Access] Hebrew letters in Msgbox()
Originally Posted by westconn1
in your code, just call like MsgBoxW with the normal parameters for standard msgbox
I can't add the Hebrew text directly in the code, if yes i get the same question marks, what I did is to create a table with Hebrew strings, then declare a variable with dlookup to the specific string in the table, and using this variable for the prompt. still its a headache to add each time a string in the table instead directly in the code.
BTW, how can I make that the message box should be RTL?
Thanks
-
Feb 1st, 2017, 03:14 PM
#7
Re: [Access] Hebrew letters in Msgbox()
there is no easy way for unicode in vba, you can use byte arrays to work with unicode strings, some years ago, i did an example with arabic, not very easy, and as i do not read arabic hard to know if the results were correct, the windows clipboard should also handle unicode correctly
i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next
dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part
come back and mark your original post as resolved if your problem is fixed
pete
-
Feb 1st, 2017, 03:17 PM
#8
Thread Starter
New Member
Re: [Access] Hebrew letters in Msgbox()
And how about making the message box show up RTL?
-
Feb 2nd, 2017, 04:35 AM
#9
Re: [Access] Hebrew letters in Msgbox()
i am not sure there is any option available to do rtl with a vb6 /vba messagebox
you could possibly use a vb.net class as an activex called from your VBA
i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next
dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part
come back and mark your original post as resolved if your problem is fixed
pete
-
Feb 2nd, 2017, 12:58 PM
#10
Thread Starter
New Member
Re: [Access] Hebrew letters in Msgbox()
Originally Posted by westconn1
i am not sure there is any option available to do rtl with a vb6 /vba messagebox
I am not talking about the VB MsgBox(), my question is about the unicode message box function in the link above.
-
Feb 2nd, 2017, 03:31 PM
#11
Re: [Access] Hebrew letters in Msgbox()
my question is about the unicode message box function in the link above.
as far as i can tell they are the same thing, just wrapped differently
try adding the value of vbmsgboxrtlreading to the buttons, though i am not sure if it will work
in the example from the link
Code:
Select Case MsgBoxW(Msg, vbYesNoCancel Or vbQuestion Or vbDefaultButton2 Or vbMsgBoxRtlReading)
i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next
dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part
come back and mark your original post as resolved if your problem is fixed
pete
-
Feb 2nd, 2017, 03:39 PM
#12
Thread Starter
New Member
Re: [Access] Hebrew letters in Msgbox()
Originally Posted by westconn1
as far as i can tell they are the same thing, just wrapped differently
try adding the value of vbmsgboxrtlreading to the buttons, though i am not sure if it will work
in the example from the link
Code:
Select Case MsgBoxW(Msg, vbYesNoCancel Or vbQuestion Or vbDefaultButton2 Or vbMsgBoxRtlReading)
This worked just for the title not for the prompt. but by adding vbMsgBoxRtlReading + vbMsgBoxRight it got resolved, now everything is fine.
Thanks for your great help!
-
Feb 3rd, 2017, 05:49 AM
#13
Re: [RESOLVED] [Access] Hebrew letters in Msgbox()
i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next
dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part
come back and mark your original post as resolved if your problem is fixed
pete
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
|