Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default vba select same cell across all worksheets

Hi...

I am trying, in vba, to select one cell across all the sheets in a
workbook and Copy/Paste Special values.

Can anyone help with the code to select the same cell in all the
worksheets? The sheetnames will not always be the same.

Thank you,

Terry
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default vba select same cell across all worksheets

One way

Sub test()
Dim sh As Worksheet
For Each sh In ThisWorkbook.Worksheets
sh.Range("B1").Value = sh.Range("B1").Value
Next
End Sub


--
Regards Ron de Bruin
http://www.rondebruin.nl


"tcnolan" wrote in message om...
Hi...

I am trying, in vba, to select one cell across all the sheets in a
workbook and Copy/Paste Special values.

Can anyone help with the code to select the same cell in all the
worksheets? The sheetnames will not always be the same.

Thank you,

Terry



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default vba select same cell across all worksheets

Hi Ron,

Thanks so much...that worked perfectly.

Terry



*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!
Reply
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
VBA: Column Select then Data Select then return to cell A1 James C[_2_] Excel Discussion (Misc queries) 3 February 1st 10 11:35 AM
Locked Several Worksheets, allow format cells/select unlocked cell Ana24 Excel Discussion (Misc queries) 2 September 26th 09 01:15 AM
Using formulas to select cells (Ex: Select every nth cell in a col Lakeview Photographic Services Excel Discussion (Misc queries) 2 March 15th 07 02:17 PM
Select all worksheets J Shrimps, Jr. Excel Worksheet Functions 1 March 25th 05 10:27 AM
Select all worksheets Phan Excel Worksheet Functions 0 November 10th 04 04:33 AM


All times are GMT +1. The time now is 09:04 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"