|
-
Apr 25th, 2007, 03:59 AM
#1
Thread Starter
Member
How to Switch between Excel Worksheets ??
Hi!
I just wanted to know how i could switch between two worksheets in the same workbook (excel file) through the program.
I understand that we can perform functions only on the active sheet at a time.. Is this true...
jus wanted to know that if i just assign different worksheets to the activesheet, will it help me to work one sheet then go back to the previous one...
Or is there a better way to tackle this problem...
cheers
Abhilash
-
Apr 25th, 2007, 04:52 AM
#2
Re: How to Switch between Excel Worksheets ??
You can use Sheets("SheetName").Select to select another sheet.
Use [code] source code here[/code] tags when you post source code.
My Articles
-
Apr 25th, 2007, 05:36 AM
#3
Re: How to Switch between Excel Worksheets ??
Hi Abhilash
Would suggest to avoid using ".Select". This will take care of most of your error messages 
Directly address the cells if you want to....
For example
vb Code:
Sheets("Sheet2").Select
Range("A1").Select
Range("A1").Value = "asdfgh"
Sheets("Sheet3").Select
Range("A1").Select
Range("A1").Value = "aaaa"
can also be written as
vb Code:
Sheets("Sheet2").Range("A1").Value = "asdfgh"
Sheets("Sheet3").Range("A1").Value = "aaaa"
Hope this helps...
If you have any query, feel free to post it back
A good exercise for the Heart is to bend down and help another up...
Please Mark your Thread " Resolved", if the query is solved
MyGear:
★ CPU ★ Ryzen 5 5800X
★ GPU ★ NVIDIA GeForce RTX 3080 TI Founder Edition
★ RAM ★ G. Skill Trident Z RGB 32GB 3600MHz
★ MB ★ ASUS TUF GAMING X570 (WI-FI) ATX Gaming
★ Storage ★ SSD SB-ROCKET-1TB + SEAGATE 2TB Barracuda IHD
★ Cooling ★ NOCTUA NH-D15 CHROMAX BLACK 140mm + 10 of Noctua NF-F12 PWM
★ PSU ★ ANTEC HCG-1000-EXTREME 1000 Watt 80 Plus Gold Fully Modular PSU
★ Case ★ LIAN LI PC-O11 DYNAMIC XL ROG (BLACK) (G99.O11DXL-X)
★ Monitor ★ LG Ultragear 27" 240Hz Gaming Monitor
★ Keyboard ★ TVS Electronics Gold Keyboard
★ Mouse ★ Logitech G502 Hero
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|