+ Reply to Thread
Results 1 to 3 of 3

Trouble with ActiveControls and Forms

  1. #1
    Registered User
    Join Date
    08-18-2004
    Posts
    97

    Question Trouble with ActiveControls and Forms

    Hello


    I have a Option Button (from forms) with a Macro Attached to it that changes the values of a combobox (also from Forms). Here is the code i am using:


    Please Login or Register  to view this content.

    My problems araise when i protect the sheet. Cause the application crashes.

    I tried with ActiveControls but i haven't been able enough to make it run.


    Any help on how to proceed will be welcomed,


    Thanks in advance

    Regards

    Jose Luis

  2. #2
    Bob Phillips
    Guest

    Re: Trouble with ActiveControls and Forms

    Saludos Jose Luis,

    I think you need to unprotect the sheet at the start, and protect it again
    at the end. Look up protect and unprotect in help.

    Why would you use a combobox with only one item?

    --

    HTH

    RP
    (remove nothere from the email address if mailing direct)


    "jose luis" <[email protected]> wrote
    in message news:[email protected]...
    >
    > Hello
    >
    >
    > I have a Option Button (from forms) with a Macro Attached to it that
    > changes the values of a combobox (also from Forms). Here is the code i
    > am using:
    >
    >
    >
    > Code:
    > --------------------
    > Sub OpcionCero()
    > ' Boton para Seleccion de Opcion Cotizacion Activa
    > ' Macro recorded 1/5/2005 by jose luis
    > '
    > Application.ScreenUpdating = False
    >
    > ActiveSheet.Shapes("Drop Down 428").Select
    > With Selection
    > .ListFillRange = "$P$2" 'Letrero Cotizacion Actual
    > .LinkedCell = "$L$40"
    > .DropDownLines = 1
    > .Display3DShading = True
    > End With
    >
    > Range("A2").Select
    > Sheets("ADM_SYS").Range("NumeroCotizacion") = " "
    >
    > Application.ScreenUpdating = True
    > End Sub
    > --------------------
    >
    >
    >
    > My problems araise when i protect the sheet. Cause the application
    > crashes.
    >
    > I tried with ActiveControls but i haven't been able enough to make it
    > run.
    >
    >
    > Any help on how to proceed will be welcomed,
    >
    >
    > Thanks in advance
    >
    > Regards
    >
    > Jose Luis
    >
    >
    > --
    > jose luis
    > ------------------------------------------------------------------------
    > jose luis's Profile:

    http://www.excelforum.com/member.php...o&userid=13312
    > View this thread: http://www.excelforum.com/showthread...hreadid=380998
    >




  3. #3
    Registered User
    Join Date
    08-18-2004
    Posts
    97
    Thank you for answering Bob. What really happens is that I 'm building a small application that i want to be shared, therefore i'm changing all the xyz.select instructions for avoid the application from crashing when shared.

    In this particular code, depending on wich option button is selected, a macro is run to change the text of the ComboBox to show just "None" without more posible entries. Later when the user chooses "option button 2", another macro runs to change the .ListFillRange= "Historia!A4:A1500" and .DropDownLines to 10

    Here is the code i'm using for the second macro:


    Please Login or Register  to view this content.

    My problem is how to run this macro changing the lines :

    Please Login or Register  to view this content.
    with something like:

    Please Login or Register  to view this content.

    I have tried that with no luck. Hope I explain it clear enough for you to give a hand with this
    I would like to understand why my proposed solution don't works.

    Thank you so much Bob.

    Regards Jose Luis
    Quote Originally Posted by Bob Phillips
    Saludos Jose Luis,

    I think you need to unprotect the sheet at the start, and protect it again
    at the end. Look up protect and unprotect in help.

    Why would you use a combobox with only one item?

    --

    HTH

    RP
    (remove nothere from the email address if mailing direct)


    "jose luis" <[email protected]> wrote
    in message news:[email protected]...
    >
    > Hello
    >
    >
    > I have a Option Button (from forms) with a Macro Attached to it that
    > changes the values of a combobox (also from Forms). Here is the code i
    > am using:
    >
    >
    >
    > Code:
    > --------------------
    > Sub OpcionCero()
    > ' Boton para Seleccion de Opcion Cotizacion Activa
    > ' Macro recorded 1/5/2005 by jose luis
    > '
    > Application.ScreenUpdating = False
    >
    > ActiveSheet.Shapes("Drop Down 428").Select
    > With Selection
    > .ListFillRange = "$P$2" 'Letrero Cotizacion Actual
    > .LinkedCell = "$L$40"
    > .DropDownLines = 1
    > .Display3DShading = True
    > End With
    >
    > Range("A2").Select
    > Sheets("ADM_SYS").Range("NumeroCotizacion") = " "
    >
    > Application.ScreenUpdating = True
    > End Sub
    > --------------------
    >
    >
    >
    > My problems araise when i protect the sheet. Cause the application
    > crashes.
    >
    > I tried with ActiveControls but i haven't been able enough to make it
    > run.
    >
    >
    > Any help on how to proceed will be welcomed,
    >
    >
    > Thanks in advance
    >
    > Regards
    >
    > Jose Luis
    >
    >
    > --
    > jose luis
    > ------------------------------------------------------------------------
    > jose luis's Profile:

    http://www.excelforum.com/member.php...o&userid=13312
    > View this thread: http://www.excelforum.com/showthread...hreadid=380998
    >

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1