+ Reply to Thread
Results 1 to 2 of 2

Update sheets from master sheet

Hybrid View

  1. #1
    Registered User
    Join Date
    07-19-2009
    Location
    cairo
    MS-Off Ver
    Excel 2007
    Posts
    8

    Update sheets from master sheet

    I was get a vba sample code that update sheets from master sheet after flirting data but I was found that it create a sheets which I don’t need it and my question is could any one help me to modify this code to update the exist worksheets only and ignore the rest
    Thanks in advance
    Ahmed

    Her is the code:

    
        'check for individual worksheets
        For Each myCell In ListRange.Cells
           
          
          If WksExists(myCell.Value) = False Then
               Set wks = Sheets.Add
               On Error Resume Next
               wks.Name = myCell.Value
             If Err.Number <> 0 Then
                 MsgBox "Please rename: " & wks.Name
                 Err.Clear
               End If
            On Error GoTo 0
              wks.Move After:=Sheets(Sheets.Count)
           Else
              Set wks = Worksheets(myCell.Value)
               wks.Cells.Clear
            End If
    
            If rsp = 6 Then
              DataBaseWks.Rows("1:" & i).Copy Destination:=wks.Range("A10")
            End If
    Last edited by amzg; 08-19-2009 at 02:18 AM.

  2. #2
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,885

    Re: Update sheets from master sheet

    Hi Amzg,

    Please edit your post to wrap your code in CODE tags according to the Forum Rules. Thank you.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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