+ Reply to Thread
Results 1 to 4 of 4

VBA Do Loop for Clear contents in all sheets but sheets 1

  1. #1
    Forum Contributor
    Join Date
    02-15-2015
    Location
    Cecoslovacchia
    MS-Off Ver
    365 personal
    Posts
    100

    VBA Do Loop for Clear contents in all sheets but sheets 1

    Hello VBA friends
    I'm learning VBA and at moment I'm learning Do Loop
    I need a macro to clean all the sheets in workbook, but not sheets 1
    As you can see from Attchment
    Thank you for your help
    Attached Files Attached Files
    Last edited by GerryZucca; 01-29-2021 at 06:17 PM.

  2. #2
    Forum Contributor
    Join Date
    02-15-2015
    Location
    Cecoslovacchia
    MS-Off Ver
    365 personal
    Posts
    100

    Re: VBA Do Loop for Clear contents in all sheets but sheets 1

    hello friends
    im Close but Now i need to clean the data
    PHP Code: 
    Sub Pulisci()
    Foglio1.Activate
                
    Do
                        If 
    ActiveSheet.Next Is Nothing Then Exit Do
                        
    ActiveSheet.Next.Select
                Loop
    End Sub 

  3. #3
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: VBA Do Loop for Clear contents in all sheets but sheets 1

    You should be using criteria on the loop rather than Exit Do.
    Please Login or Register  to view this content.
    If posting code please use code tags, see here.

  4. #4
    Forum Contributor
    Join Date
    02-15-2015
    Location
    Cecoslovacchia
    MS-Off Ver
    365 personal
    Posts
    100

    Re: VBA Do Loop for Clear contents in all sheets but sheets 1

    thank you Noire
    Solved

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Clear contents on different sheets
    By Zahid0111 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 03-29-2020, 01:28 PM
  2. [SOLVED] Need to modify code to loop through these sheets and clear contents
    By g1terra in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-31-2019, 01:18 AM
  3. [SOLVED] amend code to clear contents and format in vba except row 1 in specific sheets
    By JEAN1972 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-06-2018, 10:36 AM
  4. [SOLVED] assistance vba on clear contents on several sheets invalid next control variable referenc
    By JEAN1972 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 05-23-2017, 03:39 PM
  5. I need to code to clear contents the several fixed ranges of several sheets
    By samahhamaad in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-03-2016, 05:21 PM
  6. Loop and Clear Multiple Sheets
    By ptmuldoon in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 08-29-2014, 08:26 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1