Hey all,
So, I've got this function that is supposed to just set pass a StdFont variable, after setting it's arguments from data in some arrays.
However, when I attempt to execute this funtion, I get the following error:VB Code:
Private Function getGeneralFontData(intSectionIndex As Integer, intSizePosition As Integer) as StdFont Dim sFnt As New StdFont sFnt.Size = garrChequePrinterCfg(intSectionIndex, intSizePosition) * 2 sFnt.Name = garrChequePrinterCfg(intSectionIndex, intSizePosition + 1) If garrChequePrinterCfg(intSectionIndex, intSizePosition + 2) = "Yes" Then sFnt.Bold = True Else sFnt.Bold = False End If getGeneralFontData = sFnt
Run-time error '91':
Object variable or With block not set
(this is making a reference to the line getGeneralFontData = sFnt)
I thought that I set getGeneralFontData when I declared the function? When I remover the "as StdFont" part, the function actually seems to work, except for some reason the first time the function executes the values are passed incorrectly.
Thoughts?




Reply With Quote