Public Schedule Face-to-Face & Online Instructor-Led Training - View dates & book

STL - Formerly Best Training Solutions Through Learning
TrustPilot
Excellent
Request Callback We will call you back
0207 987 3777 Call for assistance
Your Basket Basket is empty
vba excel

ResolvedVersion 2007

Trevor has attended:
Excel Advanced course
Excel VBA Intro Intermediate course
Access Intermediate course
Excel VBA Advanced course

VBA Excel 2007


Help please!


I am trying the following to copy a master sheet at 'A&E Summary' to all the worksheets in the workbook from the beginning until the sheet called 'List'. The code below works fine for a simple workbork numered say Sheets1 to 6 but not with a bigger workbork where the worksheets have been renamed. Any ideas ? Most grateful this end.




Sub looper()

Dim iCurWS As Integer
Dim WS As Worksheet

Sheets("A&E Summary").Activate
Cells.Select
Selection.Copy
For iCurWS = 2 To Worksheets.Count
Set WS = Sheets(iCurWS)
If LCase$(WS.Name) = "List" Then Exit For
Cells.Select
ActiveSheet.Paste


Next iCurWS

End Sub

Access tip:

Dsum

You can create percentage values based on individual products / items by using a Dsum function (used with a grouped query)

[Each value column] / Dsum[field:total for the column needed to be calculated],[tablename]

View all Access hints and tips

Connect with us:

0207 987 3777

Call for assistance

Request Callback

We will call you back

Server loaded in 0.09 secs.