Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 75
Default "enter" event of activex combobox?

1) How to detect that <enter is press on a editable combobox activeX
control?
From property of combobox, Style is set to DropDownCombo!

2) How to stop ActiveX control Date and Time Picker resize automatically?
As I'm using Worksheet_SelectionChange to detect that if certain range of
cell is selected, then Date and Time Picker control will appear.
However, it did not appear correctly at the specified position all the
times, and usually a "ghostly" image also occur.


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default "enter" event of activex combobox?

Use keyup or keydown event.

Try using doevents right after you display it.

--
Regards,
Tom Ogilvy

"crapit" wrote in message
...
1) How to detect that <enter is press on a editable combobox activeX
control?
From property of combobox, Style is set to DropDownCombo!

2) How to stop ActiveX control Date and Time Picker resize automatically?
As I'm using Worksheet_SelectionChange to detect that if certain range of
cell is selected, then Date and Time Picker control will appear.
However, it did not appear correctly at the specified position all the
times, and usually a "ghostly" image also occur.




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 75
Default "enter" event of activex combobox?

If the worksheet contain 8 combobox (activex), do I need to insert keydown
event for each box
"Tom Ogilvy" wrote in message
...
Use keyup or keydown event.

Try using doevents right after you display it.

--
Regards,
Tom Ogilvy

"crapit" wrote in message
...
1) How to detect that <enter is press on a editable combobox activeX
control?
From property of combobox, Style is set to DropDownCombo!

2) How to stop ActiveX control Date and Time Picker resize

automatically?
As I'm using Worksheet_SelectionChange to detect that if certain range

of
cell is selected, then Date and Time Picker control will appear.
However, it did not appear correctly at the specified position all the
times, and usually a "ghostly" image also occur.






  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default "enter" event of activex combobox?

Basically yes, although you can create a class module and use it to work for
multiple controls.

John Walkenbach demonstrates the technique using commandbuttons at:
http://j-walk.com/ss/excel/tips/tip44.htm

You can adapt it to your situation.

--
Regards,
Tom Ogilvy

"crapit" wrote in message
...
If the worksheet contain 8 combobox (activex), do I need to insert keydown
event for each box
"Tom Ogilvy" wrote in message
...
Use keyup or keydown event.

Try using doevents right after you display it.

--
Regards,
Tom Ogilvy

"crapit" wrote in message
...
1) How to detect that <enter is press on a editable combobox activeX
control?
From property of combobox, Style is set to DropDownCombo!

2) How to stop ActiveX control Date and Time Picker resize

automatically?
As I'm using Worksheet_SelectionChange to detect that if certain range

of
cell is selected, then Date and Time Picker control will appear.
However, it did not appear correctly at the specified position all the
times, and usually a "ghostly" image also occur.








  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 75
Default "enter" event of activex combobox?

How about the 2nd problem?

How to stop ActiveX control Date and Time Picker resize automatically?
As I'm using Worksheet_SelectionChange to detect that if certain range
of cell is selected, then Date and Time Picker control will appear.
However, it did not appear correctly at the specified position all the
times, and usually a "ghostly" image also occur.
The worksheet contains only 1 Date and Time Picker for a column. (i.e only 8
rows of date and time is require for the user). Is it better to have
individual Date and Time Picker for each row?

"Tom Ogilvy" wrote in message
...
Basically yes, although you can create a class module and use it to work

for
multiple controls.

John Walkenbach demonstrates the technique using commandbuttons at:
http://j-walk.com/ss/excel/tips/tip44.htm

You can adapt it to your situation.

--
Regards,
Tom Ogilvy

"crapit" wrote in message
...
If the worksheet contain 8 combobox (activex), do I need to insert

keydown
event for each box
"Tom Ogilvy" wrote in message
...
Use keyup or keydown event.

Try using doevents right after you display it.

--
Regards,
Tom Ogilvy

"crapit" wrote in message
...
1) How to detect that <enter is press on a editable combobox

activeX
control?
From property of combobox, Style is set to DropDownCombo!

2) How to stop ActiveX control Date and Time Picker resize

automatically?
As I'm using Worksheet_SelectionChange to detect that if certain

range
of
cell is selected, then Date and Time Picker control will appear.
However, it did not appear correctly at the specified position all

the
times, and usually a "ghostly" image also occur.












  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default "enter" event of activex combobox?

I offered DoEvents in the original post. I can't say exactly what problem
you are having, so don't have a pat solution for you.

--
Regards,
Tom Ogilvy


"crapit" wrote in message
...
How about the 2nd problem?

How to stop ActiveX control Date and Time Picker resize automatically?
As I'm using Worksheet_SelectionChange to detect that if certain range
of cell is selected, then Date and Time Picker control will appear.
However, it did not appear correctly at the specified position all the
times, and usually a "ghostly" image also occur.
The worksheet contains only 1 Date and Time Picker for a column. (i.e only

8
rows of date and time is require for the user). Is it better to have
individual Date and Time Picker for each row?

"Tom Ogilvy" wrote in message
...
Basically yes, although you can create a class module and use it to work

for
multiple controls.

John Walkenbach demonstrates the technique using commandbuttons at:
http://j-walk.com/ss/excel/tips/tip44.htm

You can adapt it to your situation.

--
Regards,
Tom Ogilvy

"crapit" wrote in message
...
If the worksheet contain 8 combobox (activex), do I need to insert

keydown
event for each box
"Tom Ogilvy" wrote in message
...
Use keyup or keydown event.

Try using doevents right after you display it.

--
Regards,
Tom Ogilvy

"crapit" wrote in message
...
1) How to detect that <enter is press on a editable combobox

activeX
control?
From property of combobox, Style is set to DropDownCombo!

2) How to stop ActiveX control Date and Time Picker resize
automatically?
As I'm using Worksheet_SelectionChange to detect that if certain

range
of
cell is selected, then Date and Time Picker control will appear.
However, it did not appear correctly at the specified position all

the
times, and usually a "ghostly" image also occur.












  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 75
Default "enter" event of activex combobox?

So u suggested using doevent to correct the DoEvents
"Tom Ogilvy" wrote in message
...
I offered DoEvents in the original post. I can't say exactly what problem
you are having, so don't have a pat solution for you.

--
Regards,
Tom Ogilvy


"crapit" wrote in message
...
How about the 2nd problem?

How to stop ActiveX control Date and Time Picker resize automatically?
As I'm using Worksheet_SelectionChange to detect that if certain range
of cell is selected, then Date and Time Picker control will appear.
However, it did not appear correctly at the specified position all the
times, and usually a "ghostly" image also occur.
The worksheet contains only 1 Date and Time Picker for a column. (i.e

only
8
rows of date and time is require for the user). Is it better to have
individual Date and Time Picker for each row?

"Tom Ogilvy" wrote in message
...
Basically yes, although you can create a class module and use it to

work
for
multiple controls.

John Walkenbach demonstrates the technique using commandbuttons at:
http://j-walk.com/ss/excel/tips/tip44.htm

You can adapt it to your situation.

--
Regards,
Tom Ogilvy

"crapit" wrote in message
...
If the worksheet contain 8 combobox (activex), do I need to insert

keydown
event for each box
"Tom Ogilvy" wrote in message
...
Use keyup or keydown event.

Try using doevents right after you display it.

--
Regards,
Tom Ogilvy

"crapit" wrote in message
...
1) How to detect that <enter is press on a editable combobox

activeX
control?
From property of combobox, Style is set to DropDownCombo!

2) How to stop ActiveX control Date and Time Picker resize
automatically?
As I'm using Worksheet_SelectionChange to detect that if certain

range
of
cell is selected, then Date and Time Picker control will appear.
However, it did not appear correctly at the specified position

all
the
times, and usually a "ghostly" image also occur.














  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 70
Default "enter" event of activex combobox?

Hi,

DoEvents is a slightly misnamed routine. In other places it is known as
"yield". What it does is suspend the current thread and allow all the other
pending "events" to execute before resuming the active thread.

It is not a universal panacea, particularly in VBA, as XL may well be
running the thread you want to "yield". Nevertheless it is a good place to
start to try and work out why your screen is not redrawing as you expect.

Regards,

Peter Beach

"crapit" wrote in message
...
So u suggested using doevent to correct the DoEvents
"Tom Ogilvy" wrote in message
...
I offered DoEvents in the original post. I can't say exactly what

problem
you are having, so don't have a pat solution for you.

--
Regards,
Tom Ogilvy


"crapit" wrote in message
...
How about the 2nd problem?

How to stop ActiveX control Date and Time Picker resize automatically?
As I'm using Worksheet_SelectionChange to detect that if certain range
of cell is selected, then Date and Time Picker control will appear.
However, it did not appear correctly at the specified position all the
times, and usually a "ghostly" image also occur.
The worksheet contains only 1 Date and Time Picker for a column. (i.e

only
8
rows of date and time is require for the user). Is it better to have
individual Date and Time Picker for each row?

"Tom Ogilvy" wrote in message
...
Basically yes, although you can create a class module and use it to

work
for
multiple controls.

John Walkenbach demonstrates the technique using commandbuttons at:
http://j-walk.com/ss/excel/tips/tip44.htm

You can adapt it to your situation.

--
Regards,
Tom Ogilvy

"crapit" wrote in message
...
If the worksheet contain 8 combobox (activex), do I need to insert
keydown
event for each box
"Tom Ogilvy" wrote in message
...
Use keyup or keydown event.

Try using doevents right after you display it.

--
Regards,
Tom Ogilvy

"crapit" wrote in message
...
1) How to detect that <enter is press on a editable combobox
activeX
control?
From property of combobox, Style is set to DropDownCombo!

2) How to stop ActiveX control Date and Time Picker resize
automatically?
As I'm using Worksheet_SelectionChange to detect that if

certain
range
of
cell is selected, then Date and Time Picker control will

appear.
However, it did not appear correctly at the specified position

all
the
times, and usually a "ghostly" image also occur.
















  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default "enter" event of activex combobox?

No, I suggested using the command doevents after you issue the command to
display the date time picker at the specified location. Hopefully this will
correct the ghost image problem you describe. Peter has kindly offered an
explanation of what DoEvents does.

--
Regards,
Tom Ogilvy

"crapit" wrote in message
...
So u suggested using doevent to correct the DoEvents
"Tom Ogilvy" wrote in message
...
I offered DoEvents in the original post. I can't say exactly what

problem
you are having, so don't have a pat solution for you.

--
Regards,
Tom Ogilvy


"crapit" wrote in message
...
How about the 2nd problem?

How to stop ActiveX control Date and Time Picker resize automatically?
As I'm using Worksheet_SelectionChange to detect that if certain range
of cell is selected, then Date and Time Picker control will appear.
However, it did not appear correctly at the specified position all the
times, and usually a "ghostly" image also occur.
The worksheet contains only 1 Date and Time Picker for a column. (i.e

only
8
rows of date and time is require for the user). Is it better to have
individual Date and Time Picker for each row?

"Tom Ogilvy" wrote in message
...
Basically yes, although you can create a class module and use it to

work
for
multiple controls.

John Walkenbach demonstrates the technique using commandbuttons at:
http://j-walk.com/ss/excel/tips/tip44.htm

You can adapt it to your situation.

--
Regards,
Tom Ogilvy

"crapit" wrote in message
...
If the worksheet contain 8 combobox (activex), do I need to insert
keydown
event for each box
"Tom Ogilvy" wrote in message
...
Use keyup or keydown event.

Try using doevents right after you display it.

--
Regards,
Tom Ogilvy

"crapit" wrote in message
...
1) How to detect that <enter is press on a editable combobox
activeX
control?
From property of combobox, Style is set to DropDownCombo!

2) How to stop ActiveX control Date and Time Picker resize
automatically?
As I'm using Worksheet_SelectionChange to detect that if

certain
range
of
cell is selected, then Date and Time Picker control will

appear.
However, it did not appear correctly at the specified position

all
the
times, and usually a "ghostly" image also occur.
















  #10   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 75
Default "enter" event of activex combobox?

So can I say write as follow
DoEvents
'define position of Date and Time Picker
DTPicker_date.Left = Target.Left
DTPicker_date.Top = Target.Top + (Target.Height / 4)
ActiveCell.Value = DTPicker_date.Value
DTPicker_date.Visible = True

"Peter Beach" wrote in message
...
Hi,

DoEvents is a slightly misnamed routine. In other places it is known as
"yield". What it does is suspend the current thread and allow all the

other
pending "events" to execute before resuming the active thread.

It is not a universal panacea, particularly in VBA, as XL may well be
running the thread you want to "yield". Nevertheless it is a good place

to
start to try and work out why your screen is not redrawing as you expect.

Regards,

Peter Beach

"crapit" wrote in message
...
So u suggested using doevent to correct the DoEvents
"Tom Ogilvy" wrote in message
...
I offered DoEvents in the original post. I can't say exactly what

problem
you are having, so don't have a pat solution for you.

--
Regards,
Tom Ogilvy


"crapit" wrote in message
...
How about the 2nd problem?

How to stop ActiveX control Date and Time Picker resize

automatically?
As I'm using Worksheet_SelectionChange to detect that if certain

range
of cell is selected, then Date and Time Picker control will appear.
However, it did not appear correctly at the specified position all

the
times, and usually a "ghostly" image also occur.
The worksheet contains only 1 Date and Time Picker for a column.

(i.e
only
8
rows of date and time is require for the user). Is it better to have
individual Date and Time Picker for each row?

"Tom Ogilvy" wrote in message
...
Basically yes, although you can create a class module and use it

to
work
for
multiple controls.

John Walkenbach demonstrates the technique using commandbuttons

at:
http://j-walk.com/ss/excel/tips/tip44.htm

You can adapt it to your situation.

--
Regards,
Tom Ogilvy

"crapit" wrote in message
...
If the worksheet contain 8 combobox (activex), do I need to

insert
keydown
event for each box
"Tom Ogilvy" wrote in message
...
Use keyup or keydown event.

Try using doevents right after you display it.

--
Regards,
Tom Ogilvy

"crapit" wrote in message
...
1) How to detect that <enter is press on a editable

combobox
activeX
control?
From property of combobox, Style is set to DropDownCombo!

2) How to stop ActiveX control Date and Time Picker resize
automatically?
As I'm using Worksheet_SelectionChange to detect that if

certain
range
of
cell is selected, then Date and Time Picker control will

appear.
However, it did not appear correctly at the specified

position
all
the
times, and usually a "ghostly" image also occur.




















  #11   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default "enter" event of activex combobox?

You can, but it would add no value. You want it after you make the control
visible.


'define position of Date and Time Picker
DTPicker_date.Left = Target.Left
DTPicker_date.Top = Target.Top + (Target.Height / 4)
ActiveCell.Value = DTPicker_date.Value
DTPicker_date.Visible = True
DoEvents

--
Regards,
Tom Ogilvy

"crapit" wrote in message
...
So can I say write as follow
DoEvents
'define position of Date and Time Picker
DTPicker_date.Left = Target.Left
DTPicker_date.Top = Target.Top + (Target.Height / 4)
ActiveCell.Value = DTPicker_date.Value
DTPicker_date.Visible = True

"Peter Beach" wrote in message
...
Hi,

DoEvents is a slightly misnamed routine. In other places it is known as
"yield". What it does is suspend the current thread and allow all the

other
pending "events" to execute before resuming the active thread.

It is not a universal panacea, particularly in VBA, as XL may well be
running the thread you want to "yield". Nevertheless it is a good place

to
start to try and work out why your screen is not redrawing as you

expect.

Regards,

Peter Beach

"crapit" wrote in message
...
So u suggested using doevent to correct the DoEvents
"Tom Ogilvy" wrote in message
...
I offered DoEvents in the original post. I can't say exactly what

problem
you are having, so don't have a pat solution for you.

--
Regards,
Tom Ogilvy


"crapit" wrote in message
...
How about the 2nd problem?

How to stop ActiveX control Date and Time Picker resize

automatically?
As I'm using Worksheet_SelectionChange to detect that if certain

range
of cell is selected, then Date and Time Picker control will

appear.
However, it did not appear correctly at the specified position all

the
times, and usually a "ghostly" image also occur.
The worksheet contains only 1 Date and Time Picker for a column.

(i.e
only
8
rows of date and time is require for the user). Is it better to

have
individual Date and Time Picker for each row?

"Tom Ogilvy" wrote in message
...
Basically yes, although you can create a class module and use it

to
work
for
multiple controls.

John Walkenbach demonstrates the technique using commandbuttons

at:
http://j-walk.com/ss/excel/tips/tip44.htm

You can adapt it to your situation.

--
Regards,
Tom Ogilvy

"crapit" wrote in message
...
If the worksheet contain 8 combobox (activex), do I need to

insert
keydown
event for each box
"Tom Ogilvy" wrote in message
...
Use keyup or keydown event.

Try using doevents right after you display it.

--
Regards,
Tom Ogilvy

"crapit" wrote in message
...
1) How to detect that <enter is press on a editable

combobox
activeX
control?
From property of combobox, Style is set to DropDownCombo!

2) How to stop ActiveX control Date and Time Picker resize
automatically?
As I'm using Worksheet_SelectionChange to detect that if

certain
range
of
cell is selected, then Date and Time Picker control will

appear.
However, it did not appear correctly at the specified

position
all
the
times, and usually a "ghostly" image also occur.




















  #12   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 75
Default "enter" event of activex combobox?

The height of the DT Picker always go beyond the original length, despite
setting the value during workbook open
and as well as when the cell is selected using

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Not Application.Intersect(Range("D17"), Target) Is Nothing Then
Worksheets("Manhours Booking Request Form").DTPicker_date.Left =
Target.Left
Worksheets("Manhours Booking Request Form").DTPicker_date.Top =
Target.Top + (Target.Height / 4)
Worksheets("Manhours Booking Request Form").DTPicker_date.Height = 16.5
DoEvents
ActiveCell.Value = DTPicker_date.Value
DTPicker_date.Visible = True
elseif .....
"Tom Ogilvy" wrote in message
...
No, I suggested using the command doevents after you issue the command to
display the date time picker at the specified location. Hopefully this

will
correct the ghost image problem you describe. Peter has kindly offered an
explanation of what DoEvents does.

--
Regards,
Tom Ogilvy

"crapit" wrote in message
...
So u suggested using doevent to correct the DoEvents
"Tom Ogilvy" wrote in message
...
I offered DoEvents in the original post. I can't say exactly what

problem
you are having, so don't have a pat solution for you.

--
Regards,
Tom Ogilvy


"crapit" wrote in message
...
How about the 2nd problem?

How to stop ActiveX control Date and Time Picker resize

automatically?
As I'm using Worksheet_SelectionChange to detect that if certain

range
of cell is selected, then Date and Time Picker control will appear.
However, it did not appear correctly at the specified position all

the
times, and usually a "ghostly" image also occur.
The worksheet contains only 1 Date and Time Picker for a column.

(i.e
only
8
rows of date and time is require for the user). Is it better to have
individual Date and Time Picker for each row?

"Tom Ogilvy" wrote in message
...
Basically yes, although you can create a class module and use it

to
work
for
multiple controls.

John Walkenbach demonstrates the technique using commandbuttons

at:
http://j-walk.com/ss/excel/tips/tip44.htm

You can adapt it to your situation.

--
Regards,
Tom Ogilvy

"crapit" wrote in message
...
If the worksheet contain 8 combobox (activex), do I need to

insert
keydown
event for each box
"Tom Ogilvy" wrote in message
...
Use keyup or keydown event.

Try using doevents right after you display it.

--
Regards,
Tom Ogilvy

"crapit" wrote in message
...
1) How to detect that <enter is press on a editable

combobox
activeX
control?
From property of combobox, Style is set to DropDownCombo!

2) How to stop ActiveX control Date and Time Picker resize
automatically?
As I'm using Worksheet_SelectionChange to detect that if

certain
range
of
cell is selected, then Date and Time Picker control will

appear.
However, it did not appear correctly at the specified

position
all
the
times, and usually a "ghostly" image also occur.


















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
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
change "true" and "false" to "availble" and "out of stock" inthestands Excel Worksheet Functions 2 July 19th 07 07:05 PM
Help!!! Enter "7" in a cell and Excel changes the "7" to "11" immediately!!! [email protected] Excel Discussion (Misc queries) 3 January 5th 07 02:18 PM
Make "Edit" mode default, rather than "Enter"? Greg Boettcher Excel Discussion (Misc queries) 1 July 27th 06 01:46 AM
Can ActiveX controls be "disabled" and "enabled"? William DeLeo Excel Programming 1 May 7th 04 09:10 PM


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