#1   Report Post  
Posted to microsoft.public.excel.misc
mully
 
Posts: n/a
Default 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   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
  #3   Report Post  
Posted to microsoft.public.excel.misc
mully
 
Posts: n/a
Default 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   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson
 
Posts: n/a
Default 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   Report Post  
Posted to microsoft.public.excel.misc
mully
 
Posts: n/a
Default 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
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
Toolbars Missing, And option to Add Missing SmeetaG Excel Discussion (Misc queries) 3 October 19th 05 11:43 AM
Inserting and Tracking Missing Sequence matt Excel Discussion (Misc queries) 2 September 12th 05 04:26 AM
Comma is not visible in Excel DrNASA Excel Discussion (Misc queries) 1 March 10th 05 04:51 PM
missing data from table kg1953 Excel Discussion (Misc queries) 1 February 2nd 05 05:11 PM
HELP - I need to change space delimited to comma? Mayer Excel Discussion (Misc queries) 1 December 18th 04 06:21 PM


All times are GMT +1. The time now is 02:23 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"