Results 1 to 4 of 4

Altering an excel spreadsheet that has Macros

This is a discussion on Altering an excel spreadsheet that has Macros within the Excel Questions forums, part of the Question Forums category; This is actually pretty juvenal but I would like to know how to do it. I think that by now ...

  1. #1
    New Member
    Join Date
    Mar 2003
    Posts
    1

    Default Altering an excel spreadsheet that has Macros

    This is actually pretty juvenal but I would like to know how to do it. I think that by now everyone has seen an excel spreadsheet containing an NCAA Basketball tournament style format but with women as the teams. The brackets have the names and when you click on the next bracket 2 images of the women come up and you must chose, the winner moves on. This continues until there is a final and then 1 winner. I would like to know how to update or change the names and pictures. I think it would be cool to alter it to actually work for the NCAA tourney and would like to replace the womens names and pictures with the actual brackets that comes out before this years NCAA tournament. It would be a quick and easy way to fill out the brackets for the many comapny/friends pools that are out there. I would, of course, also like to be able to update the female tourney with new women and updated pics of some of the ones currently in it. If anyone could help me I would appreciate it. Thank you.

  2. #2
    New Member
    Join Date
    Jun 2002
    Posts
    24

    Default

    Sorry I don't have an answer for you. I do have a question though :D !!!

    Where did you get the Excel file that you are using for the tounament. I need to find a (preferrably free) tournament spreadsheet for an office pool.

    Thanks!

    Dr Late

  3. #3
    New Member
    Join Date
    Dec 2005
    Posts
    25

    Default Re: Altering an excel spreadsheet that has Macros

    bump!

    For search assistance, this has also been called Deloitte Girls and Totty World Cup.
    As Brett says, juvenile, but a fun distraction for a friday. Contains a few bits of cool excel wizardry in the background:
    -the 'decision' cells are like hyperlinks which open a page where the faces & names of the two competing women are served up, from a tab named DATA, which doesn't appear at the bottom
    - the code for the Match worksheet is VB heavy, suggesting that the pictures are served from a shapes folder or file

    Right, sorted some of it:
    1. unhide hidden sheets with format > sheet > unhide
    2. display the abcs & the 123s with tools>options>view>window options>display row & column headers [edit: you don't actually need to do this but i've just found it]

    The DATA worksheet stores names, seems to assign random numbers then sorts by them to randomly create each new tournament matchup, and has a scoring counter based on how each girlscharacter did in the last round. What I can't figure out is where the pitcures are getting called from. Here's the VB from the 'PlayMatch' module, which calls the Game worsheet and populates it with the two characters and their names, naming the buttons at the top as the player names.
    The PlayerLeft and PlayerRight seem to be the names, so Port and Stbd must be the picture references.


    Option Explicit
    Sub Play_Match(PlayerLeft As String, PlayerRight As String)
    Dim i As Integer
    If PlayerLeft = "" Or PlayerRight = "" Then Exit Sub
    For i = 1 To Worksheets("Game").Shapes.Count
    If Not (Worksheets("Game").Shapes(i).Name = "LeftButton" Or Worksheets("Game").Shapes(i).Name = "RightButton") Then
    Worksheets("Game").Shapes(i).Visible = False
    End If
    Next i
    ActiveWindow.DisplayVerticalScrollBar = False
    ActiveWindow.DisplayHorizontalScrollBar = False
    With Worksheets("Game")
    .Unprotect
    .Shapes("LeftButton").DrawingObject.Text = PlayerLeft & " wins"
    .Shapes("RightButton").DrawingObject.Text = PlayerRight & " wins"
    .Shapes("Port").Top = (.Range("a1:h17").Height - .Shapes("Port").Height) / 2
    .Shapes(PlayerLeft).Top = (.Range("a1:h17").Height - .Shapes(PlayerLeft).Height) / 2
    .Shapes(PlayerRight).Top = (.Range("a1:h17").Height - .Shapes(PlayerRight).Height) / 2
    .Shapes("Stbd").Top = (.Range("a1:h17").Height - .Shapes("Stbd").Height) / 2
    .Shapes("Port").Left = (.Range("a1:h17").Width / 2 - .Shapes("Port").Width) / 2
    .Shapes(PlayerLeft).Left = (.Range("a1:h17").Width / 2 - .Shapes(PlayerLeft).Width) / 2
    .Shapes(PlayerRight).Left = (.Range("a1:h17").Width / 2 - .Shapes(PlayerRight).Width) / 2 + .Range("a1:h17").Width / 2
    .Shapes("Stbd").Left = (.Range("a1:h17").Width / 2 - .Shapes("Stbd").Width) / 2 + .Range("a1:h17").Width / 2
    .Shapes("Port").Visible = True
    .Shapes(PlayerLeft).Visible = True
    .Shapes(PlayerRight).Visible = True
    .Shapes("Stbd").Visible = True
    .Visible = True
    .Select
    .Range(.Cells(1, 1), .Cells(17, 8)).Select
    ActiveWindow.Zoom = True
    .Cells(5, 3).Select
    .Protect
    End With
    End Sub



    New info: found this in Customise module:


    Sub Customize()

    Sheets("game").Visible = True
    Sheets("game").Select
    ActiveSheet.Unprotect


    For Each photos In ActiveSheet.Shapes
    photos.Visible = True
    Next

    m = MsgBox("Pour insérer une image, dans l'onglet INSERTION, clique sur IMAGES puis A PARTIR DU FICHIER... Après avoir selectionné ton image, clique droit dessus puis choisis FORMAT DE L'IMAGE. Dans l'onglet DIMENSION, definit la HAUTEUR à 5,6 et verifie que l'option PROPORTIONNEL soit coché. Il faut ensuite renommer l'image avec le nom exact de la personne (utilise le petit cadre à gauche de la barre de formule Excel). Il ne te reste plus qu'à remplacer le nom d'une des filles de l'onglet DATA par le nom de ton insertion. L'onglet GAME est alors automatiquement mis à jour. Bon jeu ! (PS : Tu peux supprimer la photo de la fille remplacée pour alléger le fichier)", vbInformation, "--= UltimateWorldCup Customization by Didier =--")

    End Sub



    Ok, so, need to find Activesheet.Shapes...
    Didier says:
    click insertion button, click images, find image.... so it seems that somewhere there's a customiser

    Ok, it's a macro. run the customiser macro, this drops all the pictures on top of each other, half on the left and half on the right. delete them all one by one.
    Next, insert your own images, format them to be 5.61cm high, 4.37cm high (take off maintain aspect ratio). rename them (with the name box, top left) & swap that name in for one of the original names on the list in the DATA sheet (name must match exactly)
    When you've got 32 of your own pics stacked up on each side like the original lot were, and you've swapped out all the names, go for it.


    - decyphering excel & looking at pictures of girls... that's what fridays were made for -

  4. #4
    New Member
    Join Date
    Dec 2005
    Posts
    25

    Default Re: Altering an excel spreadsheet that has Macros

    ...i suppose it'd be useful to post the excel sheet up but i don't think that's possible...

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


DMCA.com