If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > PC based Database Applications > Microsoft Excel > VBA code not letting you switch sheets

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-17-04, 11:37
ontheDB ontheDB is offline
Registered User
 
Join Date: Sep 2003
Posts: 80
VBA code not letting you switch sheets

I've noticed that you cannot select cells from different sheets in successive lines, you have to do it in two moves, a la:

Sheet("A").select
Sheet("B").select
Range("A1").select


instead of just:

Sheet("A").select
Sheet("B").Range("A1").select


anyone else know if this is just how it is or is it cause there's some other problem causing this ?

C
Reply With Quote
  #2 (permalink)  
Old 02-17-04, 20:07
Xl-Dennis Xl-Dennis is offline
Registered User
 
Join Date: Dec 2003
Location: Östersund Sweden
Posts: 60
Hi,

Try this:

Code:
With Sheet("A")
   .Range(A1).Select
End With
Why do You need to select a range?

Kind regards,
Dennis
__________________
Kind regards,
Dennis
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On