I am trying to loop through each worksheet in the workbook but it is not working. I think this ActiveWorkbook The worksheet is recognizing each worksheet and running only on the active worksheet. Any suggestions would be great! I'm sure this is a basic fix, but it does not understand thanks!
Worksheets for each of the worksheets in the sub Luptu (worksheets) ActiveWorkbook. If worksheets (ws.Name <> "Sheet1") and (ws.Name <> "Sheet2") and (ws.Name "Sheet 8") and (Ws.Name & lt; & gt; "Sheet 42") then with ws 'code' sheets ("Formula"). Choose Range ("FormulaRo"). Copy 'selection. Copy ActiveSheet Choose ActiveSheet.Range ("A1"). Select ActiveSheet.Paste Count range range ("Q1: X1"). Choose. Copy range ("Q3: X3000"). Select the selection. Paste Special Paste: = XlPasteFormulas, Operation: = xlNone, _ SkipBlanks: = False, Transpose: = False application.CutCopyMode = Incorrect calculation selection. Copy selection. Paste Special Paste: = xlPasteValues, Operation: = xlNone, Sk IpBlanks _: = Wrong, Transpose: = Incorrect end with end if sub in the next section
With a with a
statement, every time you type .
with reference to that object, then you need to proceed, the way you intend it, but if I think of you, then I think that the most in this line of code The easiest solution should be to add:
ws. Select
as follows:
For each Active Workbook. Worksheets (ws.Name "Sheet1") And (ws.Name << "Sheet 2"} and (ws.Name & lt; & gt; "Sheet 8") and (ws.Name << "Sheet 42") again ws Select 'code' sheets ("formula"). Choose Range ("FormulaRo"). Copy ...
And then you should work on changing things like the range ("FormulaRo").
to
to copy. ("FormulaRo") range.
so that you are correctly using the with
statement
Hope this means ...
Comments
Post a Comment