Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Missing Comma
Hi All --- Seasons Greetings,
I have a UserForm with a drop down Combo Box some of the code is below the problem I have is that the Comma after the number disappears when entering the sheet cell --- unfortunately the Comma is part of a unique identifier that I use to get information --- Question is what do I do to make it appear in the cell. ComCode.Value = "Select Code" ComCode.AddItem " 4100, " ComCode.AddItem " 4013, " Any help much appreciated Cheers Mully |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Missing Comma
Format the cell as text first.
dim myCell as range set mycell = activesheet.range("a1") 'whatever you need with mycell .numberformat = "@" 'Text .value = comcode.value end with Or prefix it with an apostrophe: mycell.value = "'" & comcode.value mully wrote: Hi All --- Seasons Greetings, I have a UserForm with a drop down Combo Box some of the code is below the problem I have is that the Comma after the number disappears when entering the sheet cell --- unfortunately the Comma is part of a unique identifier that I use to get information --- Question is what do I do to make it appear in the cell. ComCode.Value = "Select Code" ComCode.AddItem " 4100, " ComCode.AddItem " 4013, " Any help much appreciated Cheers Mully -- Dave Peterson |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
Missing Comma
Hi Dave
Thanks for the info --- worked 1st time perfectly --- just one query?? instead of activesheet on line below -- is it possible to specify a particular sheet in the Workbook. set mycell = activesheet.range("a1") 'whatever you need Once again Thank you Cheers Mully "Dave Peterson" wrote: Format the cell as text first. dim myCell as range set mycell = activesheet.range("a1") 'whatever you need with mycell .numberformat = "@" 'Text .value = comcode.value end with Or prefix it with an apostrophe: mycell.value = "'" & comcode.value mully wrote: Hi All --- Seasons Greetings, I have a UserForm with a drop down Combo Box some of the code is below the problem I have is that the Comma after the number disappears when entering the sheet cell --- unfortunately the Comma is part of a unique identifier that I use to get information --- Question is what do I do to make it appear in the cell. ComCode.Value = "Select Code" ComCode.AddItem " 4100, " ComCode.AddItem " 4013, " Any help much appreciated Cheers Mully -- Dave Peterson |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
Missing Comma
Sure.
set mycell = worksheets("whateveryouwanthere").range("a1") And if you wanted to use the next available cell in column A of sheet99, you could use something like: With worksheets("sheet99") set mycell = .cells(.rows.count,"A").end(xlup).offset(1,0) end with mully wrote: Hi Dave Thanks for the info --- worked 1st time perfectly --- just one query?? instead of activesheet on line below -- is it possible to specify a particular sheet in the Workbook. set mycell = activesheet.range("a1") 'whatever you need Once again Thank you Cheers Mully "Dave Peterson" wrote: Format the cell as text first. dim myCell as range set mycell = activesheet.range("a1") 'whatever you need with mycell .numberformat = "@" 'Text .value = comcode.value end with Or prefix it with an apostrophe: mycell.value = "'" & comcode.value mully wrote: Hi All --- Seasons Greetings, I have a UserForm with a drop down Combo Box some of the code is below the problem I have is that the Comma after the number disappears when entering the sheet cell --- unfortunately the Comma is part of a unique identifier that I use to get information --- Question is what do I do to make it appear in the cell. ComCode.Value = "Select Code" ComCode.AddItem " 4100, " ComCode.AddItem " 4013, " Any help much appreciated Cheers Mully -- Dave Peterson -- Dave Peterson |
#5
Posted to microsoft.public.excel.misc
|
|||
|
|||
Missing Comma
Hi Dave
Thanks worked spot --- I've got 23 sheets that use the info all in column A and all with a different code number -- at the moment just using cut and paste takes time but I manage -- your info cut working time by about 3 Hours. Thanks again Mully "Dave Peterson" wrote: Sure. set mycell = worksheets("whateveryouwanthere").range("a1") And if you wanted to use the next available cell in column A of sheet99, you could use something like: With worksheets("sheet99") set mycell = .cells(.rows.count,"A").end(xlup).offset(1,0) end with mully wrote: Hi Dave Thanks for the info --- worked 1st time perfectly --- just one query?? instead of activesheet on line below -- is it possible to specify a particular sheet in the Workbook. set mycell = activesheet.range("a1") 'whatever you need Once again Thank you Cheers Mully "Dave Peterson" wrote: Format the cell as text first. dim myCell as range set mycell = activesheet.range("a1") 'whatever you need with mycell .numberformat = "@" 'Text .value = comcode.value end with Or prefix it with an apostrophe: mycell.value = "'" & comcode.value mully wrote: Hi All --- Seasons Greetings, I have a UserForm with a drop down Combo Box some of the code is below the problem I have is that the Comma after the number disappears when entering the sheet cell --- unfortunately the Comma is part of a unique identifier that I use to get information --- Question is what do I do to make it appear in the cell. ComCode.Value = "Select Code" ComCode.AddItem " 4100, " ComCode.AddItem " 4013, " Any help much appreciated Cheers Mully -- Dave Peterson -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Toolbars Missing, And option to Add Missing | Excel Discussion (Misc queries) | |||
Inserting and Tracking Missing Sequence | Excel Discussion (Misc queries) | |||
Comma is not visible in Excel | Excel Discussion (Misc queries) | |||
missing data from table | Excel Discussion (Misc queries) | |||
HELP - I need to change space delimited to comma? | Excel Discussion (Misc queries) |