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_Selec tionChanging(By Val 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.Heig ht
cwidth = fPFD.Spreadpfd. ActiveCell.Widt h
fPFD.Combooptyp e.Top = fPFD.Spreadpfd. Top + ctop + 30
fPFD.Combooptyp e.Left = fPFD.Spreadpfd. Left + cleft + 19.75
fPFD.Combooptyp e.Height = 60
fPFD.Combooptyp e.Width = cwidth
fPFD.Spreadpfd. ZOrder (fmBottom)
fPFD.Combooptyp e.ZOrder (fmTop)
fPFD.Combooptyp e.Visible = True
fPFD.Combooptyp e.SetFocus
Else
fPFD.Combooptyp e.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
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_Selec tionChanging(By Val 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.Heig ht
cwidth = fPFD.Spreadpfd. ActiveCell.Widt h
fPFD.Combooptyp e.Top = fPFD.Spreadpfd. Top + ctop + 30
fPFD.Combooptyp e.Left = fPFD.Spreadpfd. Left + cleft + 19.75
fPFD.Combooptyp e.Height = 60
fPFD.Combooptyp e.Width = cwidth
fPFD.Spreadpfd. ZOrder (fmBottom)
fPFD.Combooptyp e.ZOrder (fmTop)
fPFD.Combooptyp e.Visible = True
fPFD.Combooptyp e.SetFocus
Else
fPFD.Combooptyp e.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
Comment