By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,470 Members | 924 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,470 IT Pros & Developers. It's quick & easy.

Place a combobox on top of a cell in owc11 spreadsheet

P: 2
HI all ,

I am creating a UI using VBA program where I am using OWC 11 control. What I want is that--- when user will select the pricular cell(say, D4) in the OWC spreadsheet, a combo box appears in place of the cell and from the drop-down list box he will select the correct option and that will be the value of that cell (i.e. D4).

Now I've written the code like following:--



//Code//

Private Sub Spreadpfd_SelectionChanging(ByVal Range As OWC11.Range)

Dim ctop As Double
Dim cleft As Double
Dim cheight As Double
Dim cwidth As Double

curr_cadd = Range.Address
curr_cadd = Mid(curr_cadd, 2, 1)
If curr_cadd = "D" Then
ctop = fPFD.Spreadpfd.ActiveCell.Top
cleft = fPFD.Spreadpfd.ActiveCell.Left
cheight = fPFD.Spreadpfd.ActiveCell.Height
cwidth = fPFD.Spreadpfd.ActiveCell.Width
fPFD.Combooptype.Top = fPFD.Spreadpfd.Top + ctop + 30
fPFD.Combooptype.Left = fPFD.Spreadpfd.Left + cleft + 19.75
fPFD.Combooptype.Height = 60
fPFD.Combooptype.Width = cwidth
fPFD.Spreadpfd.ZOrder (fmBottom)
fPFD.Combooptype.ZOrder (fmTop)
fPFD.Combooptype.Visible = True
fPFD.Combooptype.SetFocus
Else
fPFD.Combooptype.Visible = False
End If
End Sub

//Code//

The Issue is that , the combobox is getting visible but not on top of that cell(i.e. D4). Actually the combobox is not appearing on top of the owc11 spreadsheet control. --- Can anyone help.....Any help will be greatly appreaciated.....



Thanks & Regards,

Subhrajit
Apr 12 '08 #1
Share this Question
Share on Google+
2 Replies


QVeen72
Expert 100+
P: 1,445
Hi,

Set the ZOrder property of the ComboBox.
In Design time, Right-Click on ComboBox and "Bring It To Front"

Regards
Veena
Apr 12 '08 #2

P: 1
Hi
Put the ComboBox on a Frame control ,only a frame can be shown in a front of OWC11 spreadsheet

Cheers
Ariel
Jul 15 '12 #3

Post your reply

Sign in to post your reply or Sign up for a free account.