View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_4_] Bob Phillips[_4_] is offline
external usenet poster
 
Posts: 834
Default simple code not working

Not really my code Dave, all I did was add a single dot <bg

--

HTH

Bob

"Dave Peterson" wrote in message
...
I'd use a variation of Don's code:

sub gothere()
application.goto Thisworkbook.worksheets("Indirect Costs").Range("a1")
end sub

And this variation of Bob's code:

With ThisWorkbook
.Activate
With .Worksheets("Indirect Costs")
.Activate
.Range("a1").Select
End With
End With

I was kind of surprised that Bob's code (without the workbook activate
statement) worked if ThisWorkbook wasn't the activeworkbook.


Susan wrote:

this code bit has been working forever. 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
++++++++++++++++++++++++++++++++++++++


--

Dave Peterson