Date: prev next · Thread: first prev next last
2012 Archives by date, by thread · List index

Dear All,

I am trying to write a macro in order to create some sheets once it is
invoked (e.g. through a button).

Sheet 1 contains a list. So cells in the first column contains a name:

A1 = player1
A2 = player2
A3 = player3
A4 = player4
A5 = player5
A6 = player6
An = playern

where n may change.

So I need a funcition that counts the elements in column A (numberOfPlayer)
and that create n sheets each called player1, player2, .., playern.

I wrote something like this:

Sub DateSheets()


  While Sheet1.A & numberOhSheets <> ""
     numberOhSheets = numberOhSheets + 1

  For sht = 14 To 14 + numberOfSheets
     Sheets.Add after:=Sheets(Sheets.Count)
     Sheets(Sheets.Count).Name = Rosa.A & sht-13
End Sub

What should I do to make it working? And how can I create a button to run

Thanks a lot,


For unsubscribe instructions e-mail to:
Posting guidelines + more:
List archive:
All messages sent to this list will be publicly archived and cannot be deleted


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.