Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default interior.colorindex causing problems


I cannot work out why the simple code below runs but then the egg
timer shows until you press the ok button.

If you comment out the first line it works fine with no egtimer.
i have tried various other ways of clearing the cells colour but
it is still the same.

i am puzzled.




Private Sub CommandButton1_Click()

Range("colA").Interior.ColorIndex = 0



MsgBox (" blah blah blah"), vbOKOnly

End Sub

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default interior.colorindex causing problems

Hi puzzled,

try

Range("1:1").Interior.ColorIndex = xlNone

assuming you want to format column 1 with no colour

regards,
Peter T



"Ian" wrote in message
...

I cannot work out why the simple code below runs but then the egg
timer shows until you press the ok button.

If you comment out the first line it works fine with no egtimer.
i have tried various other ways of clearing the cells colour but
it is still the same.

i am puzzled.




Private Sub CommandButton1_Click()

Range("colA").Interior.ColorIndex = 0



MsgBox (" blah blah blah"), vbOKOnly

End Sub



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default interior.colorindex causing problems

If
assuming you want to format column 1 with no colour


Think you meant

Range("A:A").Interior.ColorIndex = xlNone
or
Columns(1).Interior.ColorIndex = xlNone

rather than

Range("1:1").Interior.ColorIndex = xlNone


which would be Row 1.

--
Regards,
Tom Ogilvy


"Peter T" <peter_t@discussions wrote in message
...
Hi puzzled,

try

Range("1:1").Interior.ColorIndex = xlNone

assuming you want to format column 1 with no colour

regards,
Peter T



"Ian" wrote in message
...

I cannot work out why the simple code below runs but then the egg
timer shows until you press the ok button.

If you comment out the first line it works fine with no egtimer.
i have tried various other ways of clearing the cells colour but
it is still the same.

i am puzzled.




Private Sub CommandButton1_Click()

Range("colA").Interior.ColorIndex = 0



MsgBox (" blah blah blah"), vbOKOnly

End Sub





  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default interior.colorindex causing problems

Oops - that's exactly what I meant!

Thanks for correcting.

Regards,
Peter T

"Tom Ogilvy" wrote in message
...
If
assuming you want to format column 1 with no colour


Think you meant

Range("A:A").Interior.ColorIndex = xlNone
or
Columns(1).Interior.ColorIndex = xlNone

rather than

Range("1:1").Interior.ColorIndex = xlNone


which would be Row 1.

--
Regards,
Tom Ogilvy


"Peter T" <peter_t@discussions wrote in message
...
Hi puzzled,

try

Range("1:1").Interior.ColorIndex = xlNone

assuming you want to format column 1 with no colour

regards,
Peter T



"Ian" wrote in message
...

I cannot work out why the simple code below runs but then the egg
timer shows until you press the ok button.

If you comment out the first line it works fine with no egtimer.
i have tried various other ways of clearing the cells colour but
it is still the same.

i am puzzled.




Private Sub CommandButton1_Click()

Range("colA").Interior.ColorIndex = 0



MsgBox (" blah blah blah"), vbOKOnly

End Sub







  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default interior.colorindex causing problems

Thanks, but i still get the same:

Private Sub CommandButton1_Click()

Range("A:A").Interior.ColorIndex = xlNone

MsgBox (" blah blah blah"), vbOKOnly

End sub

Cheers,




On Fri, 14 Apr 2006 00:46:18 +0100, "Peter T" <peter_t@discussions
wrote:

Oops - that's exactly what I meant!

Thanks for correcting.

Regards,
Peter T

"Tom Ogilvy" wrote in message
...
If
assuming you want to format column 1 with no colour


Think you meant

Range("A:A").Interior.ColorIndex = xlNone
or
Columns(1).Interior.ColorIndex = xlNone

rather than

Range("1:1").Interior.ColorIndex = xlNone


which would be Row 1.

--
Regards,
Tom Ogilvy


"Peter T" <peter_t@discussions wrote in message
...
Hi puzzled,

try

Range("1:1").Interior.ColorIndex = xlNone

assuming you want to format column 1 with no colour

regards,
Peter T



"Ian" wrote in message
...

I cannot work out why the simple code below runs but then the egg
timer shows until you press the ok button.

If you comment out the first line it works fine with no egtimer.
i have tried various other ways of clearing the cells colour but
it is still the same.

i am puzzled.




Private Sub CommandButton1_Click()

Range("colA").Interior.ColorIndex = 0



MsgBox (" blah blah blah"), vbOKOnly

End Sub









  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default interior.colorindex causing problems

I opened a new workbook. Colored columns 1 and 2 on sheet1 and added a
commandbutton. Put in code like this:

Private Sub CommandButton1_Click()
Columns(1).Interior.ColorIndex = xlNone
MsgBox "Blah Blah Blah", vbOKOnly
End Sub

I went out of design mode and clicked the button.

I got no egg timer (I assume you mean the busy Icon for the mouse).

Try it in a new workbook such as the above. I suspect it has something to
do with the workbook where you are using the code and is unrelated to the
specific code you are using although changing the interior colorindex should
generate no events.

--
Regards,
Tom Ogilvy



"Ian" wrote:

Thanks, but i still get the same:

Private Sub CommandButton1_Click()

Range("A:A").Interior.ColorIndex = xlNone

MsgBox (" blah blah blah"), vbOKOnly

End sub

Cheers,




On Fri, 14 Apr 2006 00:46:18 +0100, "Peter T" <peter_t@discussions
wrote:

Oops - that's exactly what I meant!

Thanks for correcting.

Regards,
Peter T

"Tom Ogilvy" wrote in message
...
If
assuming you want to format column 1 with no colour

Think you meant

Range("A:A").Interior.ColorIndex = xlNone
or
Columns(1).Interior.ColorIndex = xlNone

rather than

Range("1:1").Interior.ColorIndex = xlNone

which would be Row 1.

--
Regards,
Tom Ogilvy


"Peter T" <peter_t@discussions wrote in message
...
Hi puzzled,

try

Range("1:1").Interior.ColorIndex = xlNone

assuming you want to format column 1 with no colour

regards,
Peter T



"Ian" wrote in message
...

I cannot work out why the simple code below runs but then the egg
timer shows until you press the ok button.

If you comment out the first line it works fine with no egtimer.
i have tried various other ways of clearing the cells colour but
it is still the same.

i am puzzled.




Private Sub CommandButton1_Click()

Range("colA").Interior.ColorIndex = 0



MsgBox (" blah blah blah"), vbOKOnly

End Sub








  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default interior.colorindex causing problems

If you are using Excel 97 you need to change the TakeFocusOnClick property
of the commandbutton from True to False. In design mode right click the
button and select properties.

Regards,
Peter T

PS - it's a tip often suggested by Tom, and needed with your code in xl97


"Ian" wrote in message
...
Thanks, but i still get the same:

Private Sub CommandButton1_Click()

Range("A:A").Interior.ColorIndex = xlNone

MsgBox (" blah blah blah"), vbOKOnly

End sub

Cheers,




On Fri, 14 Apr 2006 00:46:18 +0100, "Peter T" <peter_t@discussions
wrote:

Oops - that's exactly what I meant!

Thanks for correcting.

Regards,
Peter T

"Tom Ogilvy" wrote in message
...
If
assuming you want to format column 1 with no colour

Think you meant

Range("A:A").Interior.ColorIndex = xlNone
or
Columns(1).Interior.ColorIndex = xlNone

rather than

Range("1:1").Interior.ColorIndex = xlNone

which would be Row 1.

--
Regards,
Tom Ogilvy


"Peter T" <peter_t@discussions wrote in message
...
Hi puzzled,

try

Range("1:1").Interior.ColorIndex = xlNone

assuming you want to format column 1 with no colour

regards,
Peter T



"Ian" wrote in message
...

I cannot work out why the simple code below runs but then the egg
timer shows until you press the ok button.

If you comment out the first line it works fine with no egtimer.
i have tried various other ways of clearing the cells colour but
it is still the same.

i am puzzled.




Private Sub CommandButton1_Click()

Range("colA").Interior.ColorIndex = 0



MsgBox (" blah blah blah"), vbOKOnly

End Sub









  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default interior.colorindex causing problems



thanks for your efforts, chaps.

I too have opened virgin workbooks in excel 1997 and 2000 and still
get the eggtimer, except when the mouse hovers over the msgbox when
the pointer changes to the arrow.

thanks,





On Fri, 14 Apr 2006 05:12:02 -0700, Tom Ogilvy
wrote:

I opened a new workbook. Colored columns 1 and 2 on sheet1 and added a
commandbutton. Put in code like this:

Private Sub CommandButton1_Click()
Columns(1).Interior.ColorIndex = xlNone
MsgBox "Blah Blah Blah", vbOKOnly
End Sub

I went out of design mode and clicked the button.

I got no egg timer (I assume you mean the busy Icon for the mouse).

Try it in a new workbook such as the above. I suspect it has something to
do with the workbook where you are using the code and is unrelated to the
specific code you are using although changing the interior colorindex should
generate no events.


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
Finding last occurence of Interior.ColorIndex 36 Linda New Users to Excel 2 May 28th 10 07:04 AM
Sumif interior.colorindex condition John Excel Worksheet Functions 7 June 1st 06 01:17 AM
problem with interior.colorindex Peter Rooney Excel Programming 7 January 20th 06 12:31 PM
Use of Interior.ColorIndex liquidhot Excel Programming 4 June 27th 05 07:22 PM
Testing for Interior.ColorIndex JeffBo Excel Programming 7 May 17th 04 09:41 PM


All times are GMT +1. The time now is 03:36 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"