Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
ossie - yes, it generally was the only workbook open & active at the
time of it executing, as it is now. update: our computer tech examined the coding & found everything was ok. he made a copy of the sheet, deleted the original sheet, and renamed the sheet to it's original name. now it works fine. don't know why! thanks again susan On Apr 1, 11:41*pm, OssieMac wrote: If it has worked previously then it was pure chance that ThisWorkbook was the ActiveWorkbook at the time thecodewas executed. You cannot Activate a Workbook and Select a Worksheet in the one line. Need to first Activate the Workbook and then Select the worksheet. ThisWorkbook.Activate Worksheets("Indirect Costs").Select With Worksheets("Indirect Costs") * * *.Range("a1").Select End With -- Regards, OssieMac "XR8 Sprintless" wrote: On 31/03/2010 5:17 AM, Susan wrote: Could it be assimpleas Sheets("Indirect Costs").Select * * *Range("A1").Select thiscodebit has beenworkingforever. *recently had a virus& *had to reinstall microsoft office 07. *now it won't work. *i'm assuming there's some wording difference it's looking for - can anybody help me out? thanks. susan ++++++++++++++++++++++++++++++++++++++ ThisWorkbook.Worksheets("Indirect Costs").Select With Worksheets("Indirect Costs") * * .Range("a1").Select End With ++++++++++++++++++++++++++++++++++++++ i also tried the following which stops on "Activate": With ThisWorkbook * * * With Worksheets("Indirect Costs") * * * * * *.Activate * * * * * *.Range("a1").Select * * * End With End With ++++++++++++++++++++++++++++++++++++++ .- Hide quoted text - - Show quoted text - |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Simple VBA Code Working in Excel 2007 but not Excel 2003 #N/A | Excel Programming | |||
Simple VBA Code written in Excel 2003 not working in Excel 2000 | Excel Programming | |||
Simple VBA code not working on new laptop | Excel Programming | |||
This should be so simple but it's not working, please help | Excel Programming | |||
This should be simple but it's not working for me! | New Users to Excel |