Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default Change_Event

I am trying to change a cell's NumberFormat within the
WorksheetChange_Event. The format is changed, but it is
not reflected in the cell until the next time I change the
cell. Any ideas on how to make the NumberFormat be
applied and used immediately after the cells value is
changed? TIA
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 576
Default Change_Event

Hawk,

I used the following and the format changed instantly when I hit the Enter
key (using Excel97):

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
Target.NumberFormat = "00000#"
End Sub

--
sb
"Hawk" wrote in message
...
I am trying to change a cell's NumberFormat within the
WorksheetChange_Event. The format is changed, but it is
not reflected in the cell until the next time I change the
cell. Any ideas on how to make the NumberFormat be
applied and used immediately after the cells value is
changed? TIA



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default Change_Event

I forgot to mention that I am using Excel 97. It seems to
work for 2000, but not 97...Any ideas for a workaround?
-----Original Message-----
Hawk,

I used the following and the format changed instantly

when I hit the Enter
key (using Excel97):

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
Target.NumberFormat = "00000#"
End Sub

--
sb
"Hawk" wrote in

message
...
I am trying to change a cell's NumberFormat within the
WorksheetChange_Event. The format is changed, but it is
not reflected in the cell until the next time I change

the
cell. Any ideas on how to make the NumberFormat be
applied and used immediately after the cells value is
changed? TIA



.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Change_Event

It works fine in xl97 if the change is made by editing the cell.

how are you updating your cell?

--
Regards,
Tom Ogilvy

Hawk wrote in message
...
I forgot to mention that I am using Excel 97. It seems to
work for 2000, but not 97...Any ideas for a workaround?
-----Original Message-----
Hawk,

I used the following and the format changed instantly

when I hit the Enter
key (using Excel97):

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
Target.NumberFormat = "00000#"
End Sub

--
sb
"Hawk" wrote in

message
...
I am trying to change a cell's NumberFormat within the
WorksheetChange_Event. The format is changed, but it is
not reflected in the cell until the next time I change

the
cell. Any ideas on how to make the NumberFormat be
applied and used immediately after the cells value is
changed? TIA



.



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default Change_Event

Thanks for responding, but I found the error. I truely
appreciate all your help...


-----Original Message-----
It works fine in xl97 if the change is made by editing

the cell.

how are you updating your cell?

--
Regards,
Tom Ogilvy

Hawk wrote in

message
...
I forgot to mention that I am using Excel 97. It seems

to
work for 2000, but not 97...Any ideas for a workaround?
-----Original Message-----
Hawk,

I used the following and the format changed instantly

when I hit the Enter
key (using Excel97):

Private Sub Worksheet_Change(ByVal Target As

Excel.Range)
Target.NumberFormat = "00000#"
End Sub

--
sb
"Hawk" wrote in

message
...
I am trying to change a cell's NumberFormat within

the
WorksheetChange_Event. The format is changed, but

it is
not reflected in the cell until the next time I

change
the
cell. Any ideas on how to make the NumberFormat be
applied and used immediately after the cells value is
changed? TIA


.



.

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



All times are GMT +1. The time now is 07:48 AM.

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"