Thread: Missing Comma
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson
 
Posts: n/a
Default 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