Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Excel VBA > Excel VBA
|
Excel VBA Discuss using VBA for Excel programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Excel VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 14th, 2008, 10:41 PM
Registered User
 
Join Date: Apr 2008
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Combobox is not appearing on top of other control

Hi ALL,

I am creating a UI using VBA form where I am using OWC11 spreadsheet control and using Office 2003. What I want is that--- when user will select the perticular cell(say, D4) in the OWC spreadsheet, a combo box should appear in place of the cell and from the drop-down list box user 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
        fPFD.Combooptype.Left = fPFD.Spreadpfd.Left + cleft + 19.75
        fPFD.Combooptype.Height = cheight
        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 not getting visible on top of that cell(i.e. D4). --- Can anyone help.....Any help will be greatly appreaciated.....

Thanks & Regards,

Subhrajit





Similar Threads
Thread Thread Starter Forum Replies Last Post
unneccsarry objects appearing harj VS.NET 2002/2003 5 April 29th, 2008 07:09 AM
Database not appearing in browser sevans BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8 1 May 30th, 2007 06:46 AM
form re-appearing problem Derek_05 Access VBA 1 January 16th, 2006 07:50 PM
Menu control on top kxh ASP.NET 2.0 Basics 1 December 21st, 2005 07:32 AM
SELECT TOP n NOT SELECTING TOP n! ibi SQL Language 8 March 30th, 2005 08:08 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.