Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Pat Pat is offline
external usenet poster
 
Posts: 122
Default Combobox setting

Why would a combobox not align itself to the cell in which it is linked to.
If for example the properties LinkedCell setting is showing it to be H20 the
combobox will sit several cells above rather than sit over the cell it is
linked to.

Any idea why this should be?

Pat


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default Combobox setting

Hi
the linking just defines where the result of your combobox should be
stored. Has nothing to do with the location.

--
Regards
Frank Kabel
Frankfurt, Germany


Pat wrote:
Why would a combobox not align itself to the cell in which it is
linked to. If for example the properties LinkedCell setting is
showing it to be H20 the combobox will sit several cells above rather
than sit over the cell it is linked to.

Any idea why this should be?

Pat


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 226
Default Combobox setting

Pat wrote:
Why would a combobox not align itself to the cell in which it is
linked to. If for example the properties LinkedCell setting is
showing it to be H20 the combobox will sit several cells above rather
than sit over the cell it is linked to.

Any idea why this should be?

Pat


The linked cell only controls the value of the combobox, not its
position.... you'll have to move it using VBA or set its properties to not
move or resize with cells.

--
Regards,

Juan Pablo González


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Combobox setting

Controls are not part of a worksheet, but are in a layer above the
worksheet. Also, comboboxes don't have to be linked, so where would they be
positioned then.

This code shows how to align it to a cell, but it won't move with any
worksheet changes.

With ActiveSheet.ComboBox1
.Left = Range("C3").Left
.Top = Range("C3").Top
End With

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Pat" wrote in message
...
Why would a combobox not align itself to the cell in which it is linked

to.
If for example the properties LinkedCell setting is showing it to be H20

the
combobox will sit several cells above rather than sit over the cell it is
linked to.

Any idea why this should be?

Pat




  #5   Report Post  
Posted to microsoft.public.excel.programming
Pat Pat is offline
external usenet poster
 
Posts: 122
Default Combobox setting

Here is the code for this control. I had it working as it should a while ago
but as I have made a few changes to the workbook something happened along
the way which has resulted in it not doing what it should now.
I can get it to keep it aligned to column AJ but not hover over any of the
cells as they become the focus.


Private Sub Worksheet_SelectionChange(ByVal Target As Range)

If InRange(ActiveCell, Range("AJ77:AJ1000")) Then
If (ActiveWindow.ActiveCell.Column = 36) And (ActiveWindow.ActiveCell.Row
<= 1000) _
Then 'Column AF & 77<= Row 1000
LabDescCB.Left = 1300
LabDescCB.LinkedCell = ActiveWindow.ActiveCell.Address _
(rowabsolute = False, columnabsolute = False)
LabDescCB.Height = ActiveWindow.ActiveCell.Height
LabDescCB.Width = ActiveWindow.ActiveCell.Width
LabDescCB.Top = ActiveWindow.ActiveCell.Top


LabDescCB.Top = (ActiveWindow.ActiveCell.Row * _
ActiveWindow.ActiveCell.Height) - ActiveWindow.ActiveCell.Height

End If
End Sub

"Bob Phillips" wrote in message
...
Controls are not part of a worksheet, but are in a layer above the
worksheet. Also, comboboxes don't have to be linked, so where would they

be
positioned then.

This code shows how to align it to a cell, but it won't move with any
worksheet changes.

With ActiveSheet.ComboBox1
.Left = Range("C3").Left
.Top = Range("C3").Top
End With

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Pat" wrote in message
...
Why would a combobox not align itself to the cell in which it is linked

to.
If for example the properties LinkedCell setting is showing it to be H20

the
combobox will sit several cells above rather than sit over the cell it

is
linked to.

Any idea why this should be?

Pat






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
setting default filter setting tpeter Charts and Charting in Excel 0 December 4th 09 02:50 PM
fill combobox depending on selection from another combobox Adam Francis Excel Discussion (Misc queries) 2 July 24th 08 07:39 PM
Setting default pivot table field setting to "sum" Mr. Moose Excel Discussion (Misc queries) 2 December 21st 04 04:43 PM
Setting ComboBox Value Ripan[_5_] Excel Programming 0 March 3rd 04 10:52 PM
Sending email via macro- setting the importance setting. Julian Milano[_2_] Excel Programming 1 January 20th 04 10:15 PM


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