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: 25
Default working with the correct worksheet

Hi all -

The code sample below now works, but from everything I've read I should
not use

Worksheets("Data").Activate

I've tried using
===========================================
With wbBook
Set wsData = .Worksheets("Data")
Set wsFormulas = .Worksheets("Formulas")
Set wsMealPlan = .Worksheets("MealPlan")
Set wsComp = .Worksheets("COMP")
End With

With wsData
Set Rng = .Range("A1:L" & Get_Rows) 'Get_Rows is UDF
End With
=============================================
But sometimes if a different sheet is active
The code does not execute on the "Data" sheet.

What am I doing wrong?
Thanks
-goss

 
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
Sort function not working correct Nick Excel Discussion (Misc queries) 1 May 17th 10 05:42 PM
The F2 function key is not working properly. How do I correct Linda 440 Excel Discussion (Misc queries) 1 May 13th 10 07:26 AM
Formulas showing as correct but not working Lesley11356 Excel Worksheet Functions 3 August 14th 08 09:07 AM
Auto Correct Isn't Working (Excel 2003) Gina Excel Discussion (Misc queries) 0 January 8th 08 03:13 PM
My formulas stopped working even though equations are correct bkristal Excel Discussion (Misc queries) 2 June 19th 07 01:32 AM


All times are GMT +1. The time now is 05:35 PM.

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"