LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Finding first blank worksheet

Jim,

Try the following code:

Sub AAA()

Dim WS As Worksheet
Dim ActiveWS As Worksheet
Dim FirstBlankSheet As Worksheet

Set ActiveWS = ActiveSheet
For Each WS In Worksheets
If Application.WorksheetFunction.CountA(WS.UsedRange. Cells) = 0 Then
Set FirstBlankSheet = WS
Exit For
End If
Next WS

If FirstBlankSheet Is Nothing Then
MsgBox "Cannot find a blank sheet"
Exit Sub
End If
ActiveWS.UsedRange.Copy
FirstBlankSheet.Range("A1").PasteSpecial xlPasteFormats
FirstBlankSheet.Range("A1").PasteSpecial xlPasteValues
Application.CutCopyMode = False

End Sub



--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
(email address is on the web site)



"Jim Tibbetts" wrote in message
...
I have a page in my workbook that contains formulas where the data changes
weekly. I want to copy the new data every week to the first blank sheet
and
then PasteSpecial the formats and values. I've come close using tips from
other posts, but I'm not quite there.
Thanks for any help.
--
Jim T



 
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
Finding Next Blank Cell in Blank Row Nick Wakeham Excel Worksheet Functions 3 June 11th 08 02:15 PM
Finding blank cells scorpiorc Excel Discussion (Misc queries) 10 December 7th 06 06:27 PM
Finding the first blank or zero value AAMIFC Excel Worksheet Functions 1 July 15th 05 04:36 AM
Finding next blank cell JaiD Excel Programming 2 June 13th 04 10:23 AM
Finding Non-Blank Cells SuperJas Excel Programming 3 April 23rd 04 04:02 PM


All times are GMT +1. The time now is 12:26 PM.

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

About Us

"It's about Microsoft Excel"