Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Chemical formula with sub/superscript in TextBox, Label etc.

Hi there,

At the moment I'm working on program for chemical calculations.
I created a Userform with a lot of TextBoxes and Labels for data
input.

Problem: I can't find a way to display chemical formulars (e. g. H20:
the "2" must be subscript) correctly in a textbox.caption or
label.value

Is there a way to enabel subscript or superscript for single
characters in a caption or label?

Thanx in advance for any advice,

- Christian

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default Chemical formula with sub/superscript in TextBox, Label etc.

Christian,
In order to use such text formats, you need a control that supports Rich
Text Format.
The RTF box does.

Note that I now get an error "The subject is not trusted for the specified
action" when trying to use this control. AFAIK, this is the result of an
update.
A quick unregister then register of this control fixed it. If you get this
problem, maybe these will help:

http://support.microsoft.com/kb/827742
http://p2p.wrox.com/topic.asp?whichp...OPIC_ID=10894&

NickHK

"Christian" wrote in message
oups.com...
Hi there,

At the moment I'm working on program for chemical calculations.
I created a Userform with a lot of TextBoxes and Labels for data
input.

Problem: I can't find a way to display chemical formulars (e. g. H20:
the "2" must be subscript) correctly in a textbox.caption or
label.value

Is there a way to enabel subscript or superscript for single
characters in a caption or label?

Thanx in advance for any advice,

- Christian



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default Chemical formula with sub/superscript in TextBox, Label etc.

"Christian" wrote in message
oups.com...
Hi there,

At the moment I'm working on program for chemical calculations.
I created a Userform with a lot of TextBoxes and Labels for data
input.

Problem: I can't find a way to display chemical formulars (e. g. H20:
the "2" must be subscript) correctly in a textbox.caption or
label.value


Hi Christian,
you need the Rich Textbox (Richtx32.ocx) instead of the Text Box.The problem
is that the Rich Textbox is nolonger trusted :(

See the discussions here (Remove the carriage returns inserted in the long
URL by the news reader) :

http://groups.google.co.uk/group/mic...49c56 9bb5369

http://groups.google.com/group/micro...b012e5230d7a81

Maybe you can use one of these :
Newsgroups: microsoft.public.excel.programming
From: Perico
Date: Mon, 19 Jun 2006 14:03:01 -0700
Local: Mon, Jun 19 2006 11:03 pm
Subject: Problem with RICHTX32.OCX

I had this problem. The solution for me was to use the msMask32.ocx
instead.

Newsgroups: microsoft.public.excel.programming
From: "RB Smissaert"
Date: Fri, 5 May 2006 23:06:07 +0100
Local: Sat, May 6 2006 12:06 am
Subject: Problem with RICHTX32.OCX

If you are interested I can mail you a RichTextBox control that behaves just
like the regular one but doesn't have this security problem.

RBS

hth
Gys


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 535
Default Chemical formula with sub/superscript in TextBox, Label etc.

Hi Christian,

Is there a way to enabel subscript or superscript for single
characters in a caption or label?


No.

You could do this (character formatting I mean) with a textbox on a
dialogsheet way back in Excel 5. Excel still supports these dialog
sheets though.

Otherwise you'd have to use third party controls I think.

Regards,

Jan Karel Pieterse
Excel MVP
http://www.jkp-ads.com
Member of:
Professional Office Developer Association
www.proofficedev.com

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,582
Default Chemical formula with sub/superscript in TextBox, Label etc.

A different approach is to find a font specifically designed with sub- and
superscripted numerals up where other infrequently used characters are
usually found. Here's the first link returned in a Google search:

http://www.chemsoc.org/networks/learnnet/RSCfont.htm

You could use this utility to figure out which character code provides the
appropriate character:

http://peltiertech.com/Excel/tricks.html#ascii

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
http://PeltierTech.com
_______


"Christian" wrote in message
oups.com...
Hi there,

At the moment I'm working on program for chemical calculations.
I created a Userform with a lot of TextBoxes and Labels for data
input.

Problem: I can't find a way to display chemical formulars (e. g. H20:
the "2" must be subscript) correctly in a textbox.caption or
label.value

Is there a way to enabel subscript or superscript for single
characters in a caption or label?

Thanx in advance for any advice,

- Christian





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 120
Default Chemical formula with sub/superscript in TextBox, Label etc.

Hi Christian,

I'd propose an additional diversion: accepting the inability of
sub-/superscript input, and, for the next treatment, using the procedure,
which converts numerals correctly. If you like, I'm able to mail a well-tried
sub.

Regards
--
Petr Bezucha


"Christian" wrote:

Hi there,

At the moment I'm working on program for chemical calculations.
I created a Userform with a lot of TextBoxes and Labels for data
input.

Problem: I can't find a way to display chemical formulars (e. g. H20:
the "2" must be subscript) correctly in a textbox.caption or
label.value

Is there a way to enabel subscript or superscript for single
characters in a caption or label?

Thanx in advance for any advice,

- Christian


Reply
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
Use a formula to populate a label from a textbox damorrison Excel Discussion (Misc queries) 5 September 4th 06 01:30 PM
Textbox and label formulas-continue damorrison Excel Discussion (Misc queries) 3 March 12th 06 06:32 PM
Centralizing Vertically of Label and TextBox zhj23 Excel Programming 0 March 2nd 06 03:28 PM
textbox result to label paradise Excel Programming 2 November 15th 03 01:10 PM
Making a TextBox look and feel like a Label in a userform Mike NG Excel Programming 0 July 29th 03 11:52 PM


All times are GMT +1. The time now is 07:27 PM.

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

About Us

"It's about Microsoft Excel"