LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Problems with same macro diferent place


Hi EveryBody


I just discovered the Control Toolbox, (thanks Dominic), so i'm movin
some of my previous Forms ComboBoxes to Control Comboboxes. I have thi
macro that runs fine in the Forms Combobox but fails in the Contro
Combobox embeded in the Sheet("Captura Datos"). The error i get say
"Run time error 1004:" Method "Range" of Objetc "_Worksheet" failed
Here are the declarations of the same macro in different places. Coul
you show me what i doing wrong?

Thanks a lot for your advice.

Joe


This one from the Controls Combobox


Code
-------------------
Private Sub ComboBox1_Change()
Application.ScreenUpdating = False
Sheets("Proceso").Select
Range("ListaMejorOpcion").Sort Key1:=Range("P25"), Order1:=xlAscending, Header:=xlNo, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
Sheets("Captura Datos").Select
Range("A38").Select
Application.ScreenUpdating = True
End Su
-------------------


This one from the Forms Combobox


Code
-------------------
Sub SortMejorOpcn()
'
' SortMejorOpcn Macro
' Macro recorded 8/1/2004 by jose luis
Application.ScreenUpdating = False
Sheets("Proceso").Select
Range("ListaMejorOpcion").Sort Key1:=Range("P25"), Order1:=xlAscending, Header:=xlNo, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
Sheets("Captura Datos").Select
Range("A38").Select
Application.ScreenUpdating = True
End Su
-------------------

--
jose lui
-----------------------------------------------------------------------
jose luis's Profile: http://www.excelforum.com/member.php...fo&userid=1331
View this thread: http://www.excelforum.com/showthread.php?threadid=37415

 
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
Place a button on a worksheet and assign a macro to it? PFB New Users to Excel 7 December 18th 08 03:28 PM
Formula/Macro to place data on the next blank row Amotif Excel Discussion (Misc queries) 2 May 12th 08 03:10 AM
Place an IF Statement into a Macro 2007 and 2003 Lisa Excel Discussion (Misc queries) 5 January 4th 08 05:30 PM
Problems with same macro diferent place Norie Excel Programming 0 May 26th 05 09:31 PM
Place code in a new workbook with a macro. help_wanted Excel Programming 1 April 1st 04 04:51 PM


All times are GMT +1. The time now is 10:00 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"