Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 55
Default Golf Challenge Continua... Cert Printing inteferes with UDF

Hi All and especially NickHK and Niek Otten

I wish to print certificate for the Winner and RunnerUp in different
Categories.
When I debug with 'F8' and it comes to Sub line 07 the debug goes
to either of the two Function code. I don't understand why. Also the
scoresheet goes ### where the function is.
However when in debug and I hover the cursor on the Sub line 07 the
comment shows the message "shCert09.Range("AE3")=<Object variable
or With block variable not set".

I have scoresheet, leaderboardsheet and Certificatesheet. Using XP with
XL03.
Any help appreciated
Thks

Option Explicit

Sub proPrintCert09()
01 Dim Cat As String
02 Dim Pos As String 'Winner or RunnerUp
03 Dim Nam As String 'Golfer name
04 Dim iR As Integer 'row no
05 shLBrd.Range("P79").Select
06 Cat = ActiveCell.Value 'say 9 hole
07 shCert09.Range("AE3") = Cat
08 For iR = 1 To 2
09 Nam = ActiveCell.Offset(iR + 2, 0).Value
10 Pos = ActiveCell.Offset(iR + 2, 7).Value
11 shCert09.Range("AE3") = Cat
12 shCert09.Range("AE4") = Pos
13 shCert09.Range("AE5") = Nam
14 Application.ScreenUpdating = False
15 shCert09.PrintOut
16 Next iR
End Sub

Function NetF9(GSc As Range, HC As Range)
01 If GSc = "" Then
02 NetF9 = ""
03 Exit Function
04 End If
05 If WorksheetFunction.IsText(GSc) Then
06 NetF9 = GSc
07 Else
08 NetF9 = GSc - (WorksheetFunction.RoundUp(HC / 2, 0))
09 End If
End Function


Function GScore(HSc As Range)
01 Dim i As Long
02 For i = 1 To HSc.Cells.Count
03 If HSc(1) = "" Then
04 GScore = ""
05 Exit Function
06 End If
07 If HSc(i) = "d" Then
08 GScore = "DQ"
09 Exit Function
10 End If
11 If HSc(i) = "n" Then
12 GScore = "NR"
13 Exit Function
14 End If
15 If HSc(i) = "r" Then
16 GScore = "RTD"
17 Exit Function
18 End If
19 GScore = GScore + HSc(i)
20 Next i
End Function

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Digital cert removal [email protected] Excel Discussion (Misc queries) 0 December 18th 08 04:30 PM
Golf Scoring with a Challenge - UDF Kieranz[_2_] Excel Programming 3 August 15th 06 06:00 AM
Digital Cert Error AP[_5_] Excel Programming 2 March 3rd 06 06:32 AM
Self Cert Transfer? jordanctc[_8_] Excel Programming 0 August 4th 04 03:48 PM
Need help w/ self-cert in XP Ed[_18_] Excel Programming 0 April 28th 04 07:50 PM


All times are GMT +1. The time now is 02:58 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"