Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Single quote in a textbox disappear when put in cell?

I have a userform in a Excel workbook, this userform basically has
columns, the first 2 are ComboBoxes and the 3rd is textboxes.

I have a save button where I put the value chosen (Or written in th
case of the textbox) of every control in a sheet (One cell for ever
control, cb or tb).

My problem is that quite often users will have to put the text in th
textbox between single quotes (Ex: 'Alex') but when putting the valu
in a cell, the first single quote disappears (Always the first, th
rest is OK).

What I am doing is:

Set SavQ = ActiveSheet.Range("A1")
SavQ.Offset(0, 2).Value = tbSelect1.Value

If I write ex: ''Alex' (2 single quotes in the beggining) in th
textbox then I get the desired value on the cell which would b
'Alex'.

Any ideas to why does this happen? Anyway to overcome it?

Best Regards

Noo

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Single quote in a textbox disappear when put in cell?

Excel uses the single quote to force data to align to the left cel
border.

Your VB solution will be the same as the manual one. Add another quot
to your user's entry when inserting into the cell

--
Message posted from http://www.ExcelForum.com

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Single quote in a textbox disappear when put in cell?

Thanks, I solved it by doing exactly what you say, but was wondering i
it was a bug or something else.

Best Regards

Noo

--
Message posted from http://www.ExcelForum.com

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
how do I insert a single quote on every cell in a column to make . Cindy Excel Discussion (Misc queries) 3 May 5th 23 03:47 AM
show apostrophe / single quote in cell Beans Excel Discussion (Misc queries) 3 April 4th 23 10:23 AM
All my textbox disappear.. Hwee Excel Worksheet Functions 1 April 22nd 09 03:55 PM
Single Quote use in cell reference Eric Excel Worksheet Functions 1 May 7th 08 05:19 PM
How do I display a single quote in a cell? Brotha B Excel Discussion (Misc queries) 1 August 17th 07 02:09 AM


All times are GMT +1. The time now is 01:16 PM.

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"