VBA - multiple sheet in a vba arrayShow Excel 2007 Ribbon in XLS file using Excel VBAexcel vba sheet comparison using vba in excel and store result in a sheet?Populating an array with named range on a specific worksheetcopy data from only 3 sheets and paste it in new sheet - ExcelExcel VBA Insert/delete Row in SheetHide Selected Columns in Excel using (VBA) Click Buttonhow to read same data from two sheet then subtract the data using vbaOpen and define two excel files in VBAHow to import the entire row(s) containing current (today's) date from a excel file into another excel file automatically without opening with VBAExcel VBA macro to send emails to unique users in range

How can I practically buy stocks?

Can someone publish a story that happened to you?

Is there a way to get a compiler for the original B programming language?

Pass By Reference VS Pass by Value

Pulling the rope with one hand is as heavy as with two hands?

Rivers without rain

Why do Computer Science majors learn Calculus?

How can I place the product on a social media post better?

How to type a section sign (§) into the Minecraft client

What does KSP mean?

Any examples of headwear for races with animal ears?

How would one muzzle a full grown polar bear in the 13th century?

Realistic Necromancy?

The Defining Moment

What is the difference between `command a[bc]d` and `command `ab,cd`

Does Gita support doctrine of eternal samsara?

Contradiction proof for inequality of P and NP?

Examples of subgroups where it's nontrivial to show closure under multiplication?

Was there a Viking Exchange as well as a Columbian one?

If a warlock with the Repelling Blast invocation casts Eldritch Blast and hits, must the targets always be pushed back?

Sci fi novel series with instant travel between planets through gates. A river runs through the gates

US visa is under administrative processing, I need the passport back ASAP

What is the most expensive material in the world that could be used to create Pun-Pun's lute?

How did Captain America manage to do this?



VBA - multiple sheet in a vba array


Show Excel 2007 Ribbon in XLS file using Excel VBAexcel vba sheet comparison using vba in excel and store result in a sheet?Populating an array with named range on a specific worksheetcopy data from only 3 sheets and paste it in new sheet - ExcelExcel VBA Insert/delete Row in SheetHide Selected Columns in Excel using (VBA) Click Buttonhow to read same data from two sheet then subtract the data using vbaOpen and define two excel files in VBAHow to import the entire row(s) containing current (today's) date from a excel file into another excel file automatically without opening with VBAExcel VBA macro to send emails to unique users in range






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








-2















Hi this macro Private Sub Workbook_Open() insert in the various sheets the macro call_color but it does not work:



Private Sub Workbook_Open()
Application.ScreenUpdating = False
'Dim ListaFogli As Variant
Dim Foglio As Variant
ListaFogli = Array("MAX1", "MAX MAX", "MAX3", "MAX4", "MAX7", "MAX MAX MAX")
For Each Foglio In ListaFogli
Call color_cell
Next Foglio
Application.ScreenUpdating = True
End Sub


Sub color_cell()
Range("A1").Interior.ColorIndex = 3
End Sub


a help?
Thanks you
max










share|improve this question
























  • All your sub does is colour A1 on the active sheet. You need to add a sheet argument.

    – SJR
    Mar 22 at 18:27











  • Help to insert references to sheets?

    – maxma62
    Mar 22 at 18:43











  • @maxma62 you don't insert a reference (if by that you mean Tools > References?) You get a sheet by asking for it from the .Sheets (or .Worksheets, there's a difference) collection of a workbook object.

    – Brad
    Mar 22 at 19:50

















-2















Hi this macro Private Sub Workbook_Open() insert in the various sheets the macro call_color but it does not work:



Private Sub Workbook_Open()
Application.ScreenUpdating = False
'Dim ListaFogli As Variant
Dim Foglio As Variant
ListaFogli = Array("MAX1", "MAX MAX", "MAX3", "MAX4", "MAX7", "MAX MAX MAX")
For Each Foglio In ListaFogli
Call color_cell
Next Foglio
Application.ScreenUpdating = True
End Sub


Sub color_cell()
Range("A1").Interior.ColorIndex = 3
End Sub


a help?
Thanks you
max










share|improve this question
























  • All your sub does is colour A1 on the active sheet. You need to add a sheet argument.

    – SJR
    Mar 22 at 18:27











  • Help to insert references to sheets?

    – maxma62
    Mar 22 at 18:43











  • @maxma62 you don't insert a reference (if by that you mean Tools > References?) You get a sheet by asking for it from the .Sheets (or .Worksheets, there's a difference) collection of a workbook object.

    – Brad
    Mar 22 at 19:50













-2












-2








-2








Hi this macro Private Sub Workbook_Open() insert in the various sheets the macro call_color but it does not work:



Private Sub Workbook_Open()
Application.ScreenUpdating = False
'Dim ListaFogli As Variant
Dim Foglio As Variant
ListaFogli = Array("MAX1", "MAX MAX", "MAX3", "MAX4", "MAX7", "MAX MAX MAX")
For Each Foglio In ListaFogli
Call color_cell
Next Foglio
Application.ScreenUpdating = True
End Sub


Sub color_cell()
Range("A1").Interior.ColorIndex = 3
End Sub


a help?
Thanks you
max










share|improve this question
















Hi this macro Private Sub Workbook_Open() insert in the various sheets the macro call_color but it does not work:



Private Sub Workbook_Open()
Application.ScreenUpdating = False
'Dim ListaFogli As Variant
Dim Foglio As Variant
ListaFogli = Array("MAX1", "MAX MAX", "MAX3", "MAX4", "MAX7", "MAX MAX MAX")
For Each Foglio In ListaFogli
Call color_cell
Next Foglio
Application.ScreenUpdating = True
End Sub


Sub color_cell()
Range("A1").Interior.ColorIndex = 3
End Sub


a help?
Thanks you
max







excel






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 22 at 18:23









SJR

13.9k31219




13.9k31219










asked Mar 22 at 18:21









maxma62maxma62

1




1












  • All your sub does is colour A1 on the active sheet. You need to add a sheet argument.

    – SJR
    Mar 22 at 18:27











  • Help to insert references to sheets?

    – maxma62
    Mar 22 at 18:43











  • @maxma62 you don't insert a reference (if by that you mean Tools > References?) You get a sheet by asking for it from the .Sheets (or .Worksheets, there's a difference) collection of a workbook object.

    – Brad
    Mar 22 at 19:50

















  • All your sub does is colour A1 on the active sheet. You need to add a sheet argument.

    – SJR
    Mar 22 at 18:27











  • Help to insert references to sheets?

    – maxma62
    Mar 22 at 18:43











  • @maxma62 you don't insert a reference (if by that you mean Tools > References?) You get a sheet by asking for it from the .Sheets (or .Worksheets, there's a difference) collection of a workbook object.

    – Brad
    Mar 22 at 19:50
















All your sub does is colour A1 on the active sheet. You need to add a sheet argument.

– SJR
Mar 22 at 18:27





All your sub does is colour A1 on the active sheet. You need to add a sheet argument.

– SJR
Mar 22 at 18:27













Help to insert references to sheets?

– maxma62
Mar 22 at 18:43





Help to insert references to sheets?

– maxma62
Mar 22 at 18:43













@maxma62 you don't insert a reference (if by that you mean Tools > References?) You get a sheet by asking for it from the .Sheets (or .Worksheets, there's a difference) collection of a workbook object.

– Brad
Mar 22 at 19:50





@maxma62 you don't insert a reference (if by that you mean Tools > References?) You get a sheet by asking for it from the .Sheets (or .Worksheets, there's a difference) collection of a workbook object.

– Brad
Mar 22 at 19:50












3 Answers
3






active

oldest

votes


















0














Try this. There's no error trapping in case the sheet name doesn't exist but should start you off.



Private Sub Workbook_Open()

Application.ScreenUpdating = False

Dim ListaFogli As Variant
Dim Foglio As Variant

ListaFogli = Array("MAX1", "MAX MAX", "MAX3", "MAX4", "MAX7", "MAX MAX MAX")

For Each Foglio In ListaFogli
color_cell CStr(Foglio)
Next Foglio

Application.ScreenUpdating = True

End Sub


Sub color_cell(s As String)
Worksheets(s).Range("A1").Interior.ColorIndex = 3
End Sub





share|improve this answer























  • Hi SJR your macro for macro color_cell work well. I changed the macro and added the macro imposta_pagina but it doesn't work

    – maxma62
    Mar 22 at 19:37


















0














Hi SJR your macro for macro color_cell work well.
I changed the macro and added the macro imposta_pagina but it doesn't work



Private Sub Workbook_Open() 'SJR



Application.ScreenUpdating = False



Dim ListaFogli As Variant
Dim Foglio As Variant



ListaFogli = Array("MAX1", "MAX MAX", "MAX3", "MAX4", "MAX7", "MAX MAX MAX")



For Each Foglio In ListaFogli



 'color_cell CStr(Foglio)
imposta_pagina CStr(Foglio)


Next Foglio



Application.ScreenUpdating = True



End Sub



Sub imposta_pagina(s As String) 'SJR



With ActiveSheet.PageSetup
.PrintTitleRows = "$1:$5"
.PrintTitleColumns = ""
End With
ActiveSheet.PageSetup.PrintArea = ""
With ActiveSheet.PageSetup
.CenterHorizontally = True
.CenterVertically = True
.Orientation = xlLandscape
.Zoom = False
.FitToPagesWide = 1
.FitToPagesTall = 30
End With


End Sub






share|improve this answer























  • First, this is more of an edit to your question rather than an answer. Second you pass in s to imposta_pagina but you don't use it. Instead you use ActiveSheet ActiveSheet needs to be the sheet to which you'd like to apply your formatting. You can either pass in a sheet object or get a sheet object from ActiveWorkbook.Sheets(s) or ThisWorkbook.Sheets(s)

    – Brad
    Mar 22 at 19:48


















0














It's right?



Sub imposta_pagina(s As String) 'esempio 2 SJR

With Worksheets(s).PageSetup
.PrintTitleRows = "$1:$5"
.PrintTitleColumns = ""
End With
Worksheets(s).PageSetup.PrintArea = ""
With Worksheets(s).PageSetup
.CenterHorizontally = True
.CenterVertically = True
.Orientation = xlLandscape
.Zoom = False
.FitToPagesWide = 1
.FitToPagesTall = 30
End With


End Sub






share|improve this answer























    Your Answer






    StackExchange.ifUsing("editor", function ()
    StackExchange.using("externalEditor", function ()
    StackExchange.using("snippets", function ()
    StackExchange.snippets.init();
    );
    );
    , "code-snippets");

    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "1"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55305717%2fvba-multiple-sheet-in-a-vba-array%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    3 Answers
    3






    active

    oldest

    votes








    3 Answers
    3






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    Try this. There's no error trapping in case the sheet name doesn't exist but should start you off.



    Private Sub Workbook_Open()

    Application.ScreenUpdating = False

    Dim ListaFogli As Variant
    Dim Foglio As Variant

    ListaFogli = Array("MAX1", "MAX MAX", "MAX3", "MAX4", "MAX7", "MAX MAX MAX")

    For Each Foglio In ListaFogli
    color_cell CStr(Foglio)
    Next Foglio

    Application.ScreenUpdating = True

    End Sub


    Sub color_cell(s As String)
    Worksheets(s).Range("A1").Interior.ColorIndex = 3
    End Sub





    share|improve this answer























    • Hi SJR your macro for macro color_cell work well. I changed the macro and added the macro imposta_pagina but it doesn't work

      – maxma62
      Mar 22 at 19:37















    0














    Try this. There's no error trapping in case the sheet name doesn't exist but should start you off.



    Private Sub Workbook_Open()

    Application.ScreenUpdating = False

    Dim ListaFogli As Variant
    Dim Foglio As Variant

    ListaFogli = Array("MAX1", "MAX MAX", "MAX3", "MAX4", "MAX7", "MAX MAX MAX")

    For Each Foglio In ListaFogli
    color_cell CStr(Foglio)
    Next Foglio

    Application.ScreenUpdating = True

    End Sub


    Sub color_cell(s As String)
    Worksheets(s).Range("A1").Interior.ColorIndex = 3
    End Sub





    share|improve this answer























    • Hi SJR your macro for macro color_cell work well. I changed the macro and added the macro imposta_pagina but it doesn't work

      – maxma62
      Mar 22 at 19:37













    0












    0








    0







    Try this. There's no error trapping in case the sheet name doesn't exist but should start you off.



    Private Sub Workbook_Open()

    Application.ScreenUpdating = False

    Dim ListaFogli As Variant
    Dim Foglio As Variant

    ListaFogli = Array("MAX1", "MAX MAX", "MAX3", "MAX4", "MAX7", "MAX MAX MAX")

    For Each Foglio In ListaFogli
    color_cell CStr(Foglio)
    Next Foglio

    Application.ScreenUpdating = True

    End Sub


    Sub color_cell(s As String)
    Worksheets(s).Range("A1").Interior.ColorIndex = 3
    End Sub





    share|improve this answer













    Try this. There's no error trapping in case the sheet name doesn't exist but should start you off.



    Private Sub Workbook_Open()

    Application.ScreenUpdating = False

    Dim ListaFogli As Variant
    Dim Foglio As Variant

    ListaFogli = Array("MAX1", "MAX MAX", "MAX3", "MAX4", "MAX7", "MAX MAX MAX")

    For Each Foglio In ListaFogli
    color_cell CStr(Foglio)
    Next Foglio

    Application.ScreenUpdating = True

    End Sub


    Sub color_cell(s As String)
    Worksheets(s).Range("A1").Interior.ColorIndex = 3
    End Sub






    share|improve this answer












    share|improve this answer



    share|improve this answer










    answered Mar 22 at 18:48









    SJRSJR

    13.9k31219




    13.9k31219












    • Hi SJR your macro for macro color_cell work well. I changed the macro and added the macro imposta_pagina but it doesn't work

      – maxma62
      Mar 22 at 19:37

















    • Hi SJR your macro for macro color_cell work well. I changed the macro and added the macro imposta_pagina but it doesn't work

      – maxma62
      Mar 22 at 19:37
















    Hi SJR your macro for macro color_cell work well. I changed the macro and added the macro imposta_pagina but it doesn't work

    – maxma62
    Mar 22 at 19:37





    Hi SJR your macro for macro color_cell work well. I changed the macro and added the macro imposta_pagina but it doesn't work

    – maxma62
    Mar 22 at 19:37













    0














    Hi SJR your macro for macro color_cell work well.
    I changed the macro and added the macro imposta_pagina but it doesn't work



    Private Sub Workbook_Open() 'SJR



    Application.ScreenUpdating = False



    Dim ListaFogli As Variant
    Dim Foglio As Variant



    ListaFogli = Array("MAX1", "MAX MAX", "MAX3", "MAX4", "MAX7", "MAX MAX MAX")



    For Each Foglio In ListaFogli



     'color_cell CStr(Foglio)
    imposta_pagina CStr(Foglio)


    Next Foglio



    Application.ScreenUpdating = True



    End Sub



    Sub imposta_pagina(s As String) 'SJR



    With ActiveSheet.PageSetup
    .PrintTitleRows = "$1:$5"
    .PrintTitleColumns = ""
    End With
    ActiveSheet.PageSetup.PrintArea = ""
    With ActiveSheet.PageSetup
    .CenterHorizontally = True
    .CenterVertically = True
    .Orientation = xlLandscape
    .Zoom = False
    .FitToPagesWide = 1
    .FitToPagesTall = 30
    End With


    End Sub






    share|improve this answer























    • First, this is more of an edit to your question rather than an answer. Second you pass in s to imposta_pagina but you don't use it. Instead you use ActiveSheet ActiveSheet needs to be the sheet to which you'd like to apply your formatting. You can either pass in a sheet object or get a sheet object from ActiveWorkbook.Sheets(s) or ThisWorkbook.Sheets(s)

      – Brad
      Mar 22 at 19:48















    0














    Hi SJR your macro for macro color_cell work well.
    I changed the macro and added the macro imposta_pagina but it doesn't work



    Private Sub Workbook_Open() 'SJR



    Application.ScreenUpdating = False



    Dim ListaFogli As Variant
    Dim Foglio As Variant



    ListaFogli = Array("MAX1", "MAX MAX", "MAX3", "MAX4", "MAX7", "MAX MAX MAX")



    For Each Foglio In ListaFogli



     'color_cell CStr(Foglio)
    imposta_pagina CStr(Foglio)


    Next Foglio



    Application.ScreenUpdating = True



    End Sub



    Sub imposta_pagina(s As String) 'SJR



    With ActiveSheet.PageSetup
    .PrintTitleRows = "$1:$5"
    .PrintTitleColumns = ""
    End With
    ActiveSheet.PageSetup.PrintArea = ""
    With ActiveSheet.PageSetup
    .CenterHorizontally = True
    .CenterVertically = True
    .Orientation = xlLandscape
    .Zoom = False
    .FitToPagesWide = 1
    .FitToPagesTall = 30
    End With


    End Sub






    share|improve this answer























    • First, this is more of an edit to your question rather than an answer. Second you pass in s to imposta_pagina but you don't use it. Instead you use ActiveSheet ActiveSheet needs to be the sheet to which you'd like to apply your formatting. You can either pass in a sheet object or get a sheet object from ActiveWorkbook.Sheets(s) or ThisWorkbook.Sheets(s)

      – Brad
      Mar 22 at 19:48













    0












    0








    0







    Hi SJR your macro for macro color_cell work well.
    I changed the macro and added the macro imposta_pagina but it doesn't work



    Private Sub Workbook_Open() 'SJR



    Application.ScreenUpdating = False



    Dim ListaFogli As Variant
    Dim Foglio As Variant



    ListaFogli = Array("MAX1", "MAX MAX", "MAX3", "MAX4", "MAX7", "MAX MAX MAX")



    For Each Foglio In ListaFogli



     'color_cell CStr(Foglio)
    imposta_pagina CStr(Foglio)


    Next Foglio



    Application.ScreenUpdating = True



    End Sub



    Sub imposta_pagina(s As String) 'SJR



    With ActiveSheet.PageSetup
    .PrintTitleRows = "$1:$5"
    .PrintTitleColumns = ""
    End With
    ActiveSheet.PageSetup.PrintArea = ""
    With ActiveSheet.PageSetup
    .CenterHorizontally = True
    .CenterVertically = True
    .Orientation = xlLandscape
    .Zoom = False
    .FitToPagesWide = 1
    .FitToPagesTall = 30
    End With


    End Sub






    share|improve this answer













    Hi SJR your macro for macro color_cell work well.
    I changed the macro and added the macro imposta_pagina but it doesn't work



    Private Sub Workbook_Open() 'SJR



    Application.ScreenUpdating = False



    Dim ListaFogli As Variant
    Dim Foglio As Variant



    ListaFogli = Array("MAX1", "MAX MAX", "MAX3", "MAX4", "MAX7", "MAX MAX MAX")



    For Each Foglio In ListaFogli



     'color_cell CStr(Foglio)
    imposta_pagina CStr(Foglio)


    Next Foglio



    Application.ScreenUpdating = True



    End Sub



    Sub imposta_pagina(s As String) 'SJR



    With ActiveSheet.PageSetup
    .PrintTitleRows = "$1:$5"
    .PrintTitleColumns = ""
    End With
    ActiveSheet.PageSetup.PrintArea = ""
    With ActiveSheet.PageSetup
    .CenterHorizontally = True
    .CenterVertically = True
    .Orientation = xlLandscape
    .Zoom = False
    .FitToPagesWide = 1
    .FitToPagesTall = 30
    End With


    End Sub







    share|improve this answer












    share|improve this answer



    share|improve this answer










    answered Mar 22 at 19:40









    maxma62maxma62

    1




    1












    • First, this is more of an edit to your question rather than an answer. Second you pass in s to imposta_pagina but you don't use it. Instead you use ActiveSheet ActiveSheet needs to be the sheet to which you'd like to apply your formatting. You can either pass in a sheet object or get a sheet object from ActiveWorkbook.Sheets(s) or ThisWorkbook.Sheets(s)

      – Brad
      Mar 22 at 19:48

















    • First, this is more of an edit to your question rather than an answer. Second you pass in s to imposta_pagina but you don't use it. Instead you use ActiveSheet ActiveSheet needs to be the sheet to which you'd like to apply your formatting. You can either pass in a sheet object or get a sheet object from ActiveWorkbook.Sheets(s) or ThisWorkbook.Sheets(s)

      – Brad
      Mar 22 at 19:48
















    First, this is more of an edit to your question rather than an answer. Second you pass in s to imposta_pagina but you don't use it. Instead you use ActiveSheet ActiveSheet needs to be the sheet to which you'd like to apply your formatting. You can either pass in a sheet object or get a sheet object from ActiveWorkbook.Sheets(s) or ThisWorkbook.Sheets(s)

    – Brad
    Mar 22 at 19:48





    First, this is more of an edit to your question rather than an answer. Second you pass in s to imposta_pagina but you don't use it. Instead you use ActiveSheet ActiveSheet needs to be the sheet to which you'd like to apply your formatting. You can either pass in a sheet object or get a sheet object from ActiveWorkbook.Sheets(s) or ThisWorkbook.Sheets(s)

    – Brad
    Mar 22 at 19:48











    0














    It's right?



    Sub imposta_pagina(s As String) 'esempio 2 SJR

    With Worksheets(s).PageSetup
    .PrintTitleRows = "$1:$5"
    .PrintTitleColumns = ""
    End With
    Worksheets(s).PageSetup.PrintArea = ""
    With Worksheets(s).PageSetup
    .CenterHorizontally = True
    .CenterVertically = True
    .Orientation = xlLandscape
    .Zoom = False
    .FitToPagesWide = 1
    .FitToPagesTall = 30
    End With


    End Sub






    share|improve this answer



























      0














      It's right?



      Sub imposta_pagina(s As String) 'esempio 2 SJR

      With Worksheets(s).PageSetup
      .PrintTitleRows = "$1:$5"
      .PrintTitleColumns = ""
      End With
      Worksheets(s).PageSetup.PrintArea = ""
      With Worksheets(s).PageSetup
      .CenterHorizontally = True
      .CenterVertically = True
      .Orientation = xlLandscape
      .Zoom = False
      .FitToPagesWide = 1
      .FitToPagesTall = 30
      End With


      End Sub






      share|improve this answer

























        0












        0








        0







        It's right?



        Sub imposta_pagina(s As String) 'esempio 2 SJR

        With Worksheets(s).PageSetup
        .PrintTitleRows = "$1:$5"
        .PrintTitleColumns = ""
        End With
        Worksheets(s).PageSetup.PrintArea = ""
        With Worksheets(s).PageSetup
        .CenterHorizontally = True
        .CenterVertically = True
        .Orientation = xlLandscape
        .Zoom = False
        .FitToPagesWide = 1
        .FitToPagesTall = 30
        End With


        End Sub






        share|improve this answer













        It's right?



        Sub imposta_pagina(s As String) 'esempio 2 SJR

        With Worksheets(s).PageSetup
        .PrintTitleRows = "$1:$5"
        .PrintTitleColumns = ""
        End With
        Worksheets(s).PageSetup.PrintArea = ""
        With Worksheets(s).PageSetup
        .CenterHorizontally = True
        .CenterVertically = True
        .Orientation = xlLandscape
        .Zoom = False
        .FitToPagesWide = 1
        .FitToPagesTall = 30
        End With


        End Sub







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Mar 22 at 20:28









        maxma62maxma62

        1




        1



























            draft saved

            draft discarded
















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55305717%2fvba-multiple-sheet-in-a-vba-array%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

            Swift 4 - func physicsWorld not invoked on collision? The Next CEO of Stack OverflowHow to call Objective-C code from Swift#ifdef replacement in the Swift language@selector() in Swift?#pragma mark in Swift?Swift for loop: for index, element in array?dispatch_after - GCD in Swift?Swift Beta performance: sorting arraysSplit a String into an array in Swift?The use of Swift 3 @objc inference in Swift 4 mode is deprecated?How to optimize UITableViewCell, because my UITableView lags

            Access current req object everywhere in Node.js ExpressWhy are global variables considered bad practice? (node.js)Using req & res across functionsHow do I get the path to the current script with Node.js?What is Node.js' Connect, Express and “middleware”?Node.js w/ express error handling in callbackHow to access the GET parameters after “?” in Express?Modify Node.js req object parametersAccess “app” variable inside of ExpressJS/ConnectJS middleware?Node.js Express app - request objectAngular Http Module considered middleware?Session variables in ExpressJSAdd properties to the req object in expressjs with Typescript