I developed a spreadsheet to score golf tournaments, do skins, various flights, etc. to help the Men's Club. It has been fun but an Excel expert, I'm not. If I could solve the problem below without using a macro that would be preferred.
Once upon a time I was a programmer, but that's moons ago. I've never written any VB or Macros for Excel. I'm using 2003 on W7 but the club uses 2007 on XP, I think.
My issue is using Excel to print the scorecards. I've developed a worksheet to print scorecards by group number. As a group number changes so does a great deal of the data on the scorecard to be printed.
I'm looking for a method to not have to manual change the group number and print the scoresheet.
I found a macro written by Jbeaucaire in May 2010 on this site that looked promising but I don't understand the code well enough to know how to modify it to work. Here is that code:
Thanks in advance for your help.
Once upon a time I was a programmer, but that's moons ago. I've never written any VB or Macros for Excel. I'm using 2003 on W7 but the club uses 2007 on XP, I think.
My issue is using Excel to print the scorecards. I've developed a worksheet to print scorecards by group number. As a group number changes so does a great deal of the data on the scorecard to be printed.
I'm looking for a method to not have to manual change the group number and print the scoresheet.
I found a macro written by Jbeaucaire in May 2010 on this site that looked promising but I don't understand the code well enough to know how to modify it to work. Here is that code:
Option Explicit
Sub IterateValues()
Dim CpyRNG As Range, MyVal As Range
Application.ScreenUpdating = False
Set CpyRNG = Sheets("Data").Range("A:A").SpecialCells(xlCellTypeConstants)
For Each MyVal In CpyRNG
With Sheets("Form")
.Range("A1").Value = MyVal.Value
.Calculate
.PrintOut Copies:=1
End With
Next MyVal
Set CpyRNG = Nothing
Application.ScreenUpdating = True
End Sub
The Group number is sequential from 1 to some tournament max. The printed material is the same on each card but the data changes depending upon the group number. Sub IterateValues()
Dim CpyRNG As Range, MyVal As Range
Application.ScreenUpdating = False
Set CpyRNG = Sheets("Data").Range("A:A").SpecialCells(xlCellTypeConstants)
For Each MyVal In CpyRNG
With Sheets("Form")
.Range("A1").Value = MyVal.Value
.Calculate
.PrintOut Copies:=1
End With
Next MyVal
Set CpyRNG = Nothing
Application.ScreenUpdating = True
End Sub
Thanks in advance for your help.