Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Don Don is offline
external usenet poster
 
Posts: 487
Default "Strange ComboBox Behavior?"

Howdy folks,

This question went unanswered and is now buried on about page 12....hope
it's ok to ask again. Below is the original post. In addition to what was
outlined in the original post, I have found that by merely adding one
hundredth of a second to the times list on Sheet2 and formatting as indicated
below, the problem is solved. Why must this be added and also why are only
two cells affected by the original entry?


"Quote"
Strange problem here. On Sheet 2 I have two columns of data that propagate
two ComboBox's on a Form. This Form feeds data to Sheet1. CB1 is propogated
by Column A. CB2 by Column B. Both these lists were developed by making the
first two entries and then draging down the required number of Rows. Column
A is a list of dates representing the first day of each week of the year.
I've found no error in selecting dates in CB1. CB2 is a list of times, 12AM
to 11:45PM in 15 minute increments. All times except two work correctly.
But, at 6AM and 12PM the macro fails in the Change event with the error
listed below. Only those two times give this error. By changing those
times, on Sheet2, manually to 6:01AM and 12:01PM, the Change event works
correctly. Changing these times back to 6:00AM and 12:00PM manually and the
Change event fails again........any ideas?

Private Sub ComboBox2_Change()

ComboBox2.Value = Format(ComboBox2.Value, "hh:mm AM/PM")

End Sub

Run-time error '380':
Could not set the Value property. Invalid property value.
"Unquote"

TIA,
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,588
Default "Strange ComboBox Behavior?"

I get the same result (I assume, since you don't specify what you mean by
"fails") - with 6AM gives "12:25AM" and 12AM gives "1:02AM"

No idea why.

Tim


"Don" wrote in message
...
Howdy folks,

This question went unanswered and is now buried on about page 12....hope
it's ok to ask again. Below is the original post. In addition to what
was
outlined in the original post, I have found that by merely adding one
hundredth of a second to the times list on Sheet2 and formatting as
indicated
below, the problem is solved. Why must this be added and also why are
only
two cells affected by the original entry?


"Quote"
Strange problem here. On Sheet 2 I have two columns of data that propagate
two ComboBox's on a Form. This Form feeds data to Sheet1. CB1 is
propogated
by Column A. CB2 by Column B. Both these lists were developed by making
the
first two entries and then draging down the required number of Rows.
Column
A is a list of dates representing the first day of each week of the year.
I've found no error in selecting dates in CB1. CB2 is a list of times,
12AM
to 11:45PM in 15 minute increments. All times except two work correctly.
But, at 6AM and 12PM the macro fails in the Change event with the error
listed below. Only those two times give this error. By changing those
times, on Sheet2, manually to 6:01AM and 12:01PM, the Change event works
correctly. Changing these times back to 6:00AM and 12:00PM manually and
the
Change event fails again........any ideas?

Private Sub ComboBox2_Change()

ComboBox2.Value = Format(ComboBox2.Value, "hh:mm AM/PM")

End Sub

Run-time error '380':
Could not set the Value property. Invalid property value.
"Unquote"

TIA,



  #3   Report Post  
Posted to microsoft.public.excel.programming
Don Don is offline
external usenet poster
 
Posts: 487
Default "Strange ComboBox Behavior?"

Good Morning Tim,

Thanks for the response.....good to know I'm not the only one that noticed
this problem.

And yes, that's what I meant by "fails"....i.e. doesn't give the correct
response.
I'm thinking it must have something to do with the way Excel rounds off
numbers but that's just a guess. And if rounding was the problem, I would
think it would occur at some point (maybe at a different time) when the one
hundredth is added to the list. But adding the on hundredth to the list and
all works well....at least the times are displayed and copied correctly.

Thanks again,

Don

"Tim Williams" wrote:

I get the same result (I assume, since you don't specify what you mean by
"fails") - with 6AM gives "12:25AM" and 12AM gives "1:02AM"

No idea why.

Tim


"Don" wrote in message
...
Howdy folks,

This question went unanswered and is now buried on about page 12....hope
it's ok to ask again. Below is the original post. In addition to what
was
outlined in the original post, I have found that by merely adding one
hundredth of a second to the times list on Sheet2 and formatting as
indicated
below, the problem is solved. Why must this be added and also why are
only
two cells affected by the original entry?


"Quote"
Strange problem here. On Sheet 2 I have two columns of data that propagate
two ComboBox's on a Form. This Form feeds data to Sheet1. CB1 is
propogated
by Column A. CB2 by Column B. Both these lists were developed by making
the
first two entries and then draging down the required number of Rows.
Column
A is a list of dates representing the first day of each week of the year.
I've found no error in selecting dates in CB1. CB2 is a list of times,
12AM
to 11:45PM in 15 minute increments. All times except two work correctly.
But, at 6AM and 12PM the macro fails in the Change event with the error
listed below. Only those two times give this error. By changing those
times, on Sheet2, manually to 6:01AM and 12:01PM, the Change event works
correctly. Changing these times back to 6:00AM and 12:00PM manually and
the
Change event fails again........any ideas?

Private Sub ComboBox2_Change()

ComboBox2.Value = Format(ComboBox2.Value, "hh:mm AM/PM")

End Sub

Run-time error '380':
Could not set the Value property. Invalid property value.
"Unquote"

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
"Strange ComboBox Behavior?" Don[_2_] Excel Programming 0 August 22nd 08 02:43 PM
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell Steve Kay Excel Discussion (Misc queries) 2 August 8th 08 01:54 AM
what does =EMBED("Forms.ComboBox.1","") mean? dan dungan Excel Programming 2 April 10th 08 10:47 PM
Is it possible to change the behavior of "paste" control in Excel? [email protected] Excel Programming 1 January 11th 07 10:42 PM
sendkeys "^v" behavior changed with the office 2003 version? Tarzan of the VisualBasic Gorillas Excel Programming 0 September 3rd 04 05:02 PM


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