LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
Jo Jo is offline
external usenet poster
 
Posts: 113
Default 2-byte characters: from VBA code to a worksheet; in MsgBox prompts

Hi,
If filling cells from VBA code with a string containing 2-byte characters
(Central European), the result is corrupted characters in worksheet cells.
eg.

sheet1.cells(1,1).value = "č1ť2ď3ň4ľ5" results in è12ï3ò4¾5 in a cell

Related topic is using 2-byte characters in MsgBox prompts. If controls are
drawn in the VBA editor this can be prevented by setting appropriate script,
however I do not know how to do it with "common" msgboxes defined in a
simpliest way eg.
msgbox "č1ť2ď3ň4ľ5" or with dynamic captions of controls which seem to
overwrite the default script of respective control's caption.

Storing strings somewhere in cells and copying the values from cells to
cells does work but I hope there is some smoother way how to solve it.
Moreover this way does not work with msgbox prompts resp. it converts all
characters into 1-byte characters (in given example c1t2d3n4l5)

Thanks in advance for help
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Saving double-byte characters as unicode text in a CSV file Michael Bond Excel Discussion (Misc queries) 4 January 29th 09 10:01 PM
Control save prompts in VB code bobcat Excel Programming 2 July 28th 05 01:08 PM
VBA code to enter extended characters onto a worksheet Peter Rooney Excel Programming 5 January 21st 05 10:14 AM
MsgBox Spacing of Characters Chuckles123[_30_] Excel Programming 1 October 9th 04 10:29 PM
MsgBox Spacing of Characters Chuckles123[_28_] Excel Programming 1 October 8th 04 04:14 AM


All times are GMT +1. The time now is 08:56 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright 2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"