Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Trouble with ActiveControls and Forms


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:



Code:
--------------------
Application.ScreenUpdating = False
'DesprotegeHoja
ActiveSheet.Shapes("Drop Down 428").Select
With Selection
.ListFillRange = "Historia!A4:A1500"
.LinkedCell = "$L$40"
.DropDownLines = 10
.Display3DShading = True
End With

Range("A2").Select
Sheets("ADM_SYS").Range("NumeroCotizacion") = " "
'ProtegeHoja
Application.ScreenUpdating = True
End Sub
--------------------



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


Code:
--------------------
ActiveSheet.Shapes("Drop Down 428").Select
With Selection
.ListFillRange = "Historia!A4:A1500"
.LinkedCell = "$L$40"
.DropDownLines = 10
.Display3DShading = True
End With

--------------------


with something like:


Code:
--------------------
ActiveSheet.Shapes("Drop Down 428").ListFillRange = "Historia!A4:A1500"
ActiveSheet.Shapes("Drop Down 428").LinkedCell = "$L$40"
ActiveSheet.Shapes("Drop Down 428").DropDownLines = 10
ActiveSheet.Shapes("Drop Down 428").Display3DShading = True
--------------------



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
Bob Phillips Wrote:
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"
wrote
in message
...

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



--
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
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
UDF trouble Ray A Excel Discussion (Misc queries) 1 September 8th 05 09:23 PM
>= Trouble AcesUp Excel Discussion (Misc queries) 3 August 23rd 05 11:43 PM
RefEdits and normal forms / forms in a DLL David Welch Excel Programming 0 December 1st 04 03:49 PM
Forms that open from forms Azza Excel Programming 1 October 12th 04 10:54 PM
Calling Forms from Forms - Exit problems Stuart[_5_] Excel Programming 3 May 25th 04 06:50 AM


All times are GMT +1. The time now is 04:18 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"