Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
how do I insert a single quote on every cell in a column to make . | Excel Discussion (Misc queries) | |||
show apostrophe / single quote in cell | Excel Discussion (Misc queries) | |||
All my textbox disappear.. | Excel Worksheet Functions | |||
Single Quote use in cell reference | Excel Worksheet Functions | |||
How do I display a single quote in a cell? | Excel Discussion (Misc queries) |