Click here to Skip to main content
15,915,164 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: How do I control command-line apps? Pin
S. Senthil Kumar4-Nov-05 1:01
S. Senthil Kumar4-Nov-05 1:01 
GeneralRe: How do I control command-line apps? Pin
vykintasv4-Nov-05 7:43
vykintasv4-Nov-05 7:43 
QuestionHow to make my mail server go global Pin
saood swar3-Nov-05 19:21
saood swar3-Nov-05 19:21 
QuestionHow to update Access DB from Data Grid in VB.net Pin
varient3-Nov-05 18:58
varient3-Nov-05 18:58 
AnswerRe: How to update Access DB from Data Grid in VB.net Pin
Christian Graus3-Nov-05 19:12
protectorChristian Graus3-Nov-05 19:12 
Question[Message Deleted] Pin
xfitr23-Nov-05 13:28
xfitr23-Nov-05 13:28 
AnswerRe: VB6 Custom Control Problem Pin
Christian Graus3-Nov-05 13:47
protectorChristian Graus3-Nov-05 13:47 
GeneralRe: VB6 Custom Control Problem Pin
DA_Loring10-Nov-05 0:13
DA_Loring10-Nov-05 0:13 
Garrett Klas wrote:
Private sub Example()
Dim ctl as ctlExample
Dim iFontSize as integer

iFontSize = ctl.Fontsize <-- Throws Object/Variable not set Error
End Sub


ctl is not initialised. All you have done is reference it. You need Dim ctl as new ctlExample, or a Set ctl = new ctlExample at the start of the routine.

Having said that, the control, assuming it is a User Control, should be sited on a form. Just accessing the control in the manner you show probably won't do anything as it would be creating a new instance of the control and I am not sure where it would be. You really need to access the control where it is sited i.e. 'Form1.ctlExample.FontSize = x' again assuming that you have a property called FontSise exposed in the control.
-- modified at 6:19 Thursday 10th November, 2005
General[Message Deleted] Pin
xfitr210-Nov-05 8:56
xfitr210-Nov-05 8:56 
GeneralRe: VB6 Custom Control Problem Pin
DA_Loring10-Nov-05 21:09
DA_Loring10-Nov-05 21:09 
Questionhow to Pin
drcabr3-Nov-05 12:45
drcabr3-Nov-05 12:45 
AnswerRe: how to Pin
Christian Graus3-Nov-05 13:36
protectorChristian Graus3-Nov-05 13:36 
QuestionRETRIEVING REGISTRY VALUES w/ Spaces Pin
kjmorford3-Nov-05 9:15
kjmorford3-Nov-05 9:15 
AnswerRe: RETRIEVING REGISTRY VALUES w/ Spaces Pin
Dave Kreskowiak3-Nov-05 9:59
mveDave Kreskowiak3-Nov-05 9:59 
GeneralRe: RETRIEVING REGISTRY VALUES w/ Spaces Pin
kjmorford3-Nov-05 10:41
kjmorford3-Nov-05 10:41 
GeneralRe: RETRIEVING REGISTRY VALUES w/ Spaces Pin
kjmorford3-Nov-05 11:50
kjmorford3-Nov-05 11:50 
GeneralRe: RETRIEVING REGISTRY VALUES w/ Spaces Pin
kjmorford3-Nov-05 12:22
kjmorford3-Nov-05 12:22 
QuestionDynamic setting of Checkbox on load Pin
mitli3-Nov-05 6:59
mitli3-Nov-05 6:59 
AnswerRe: Dynamic setting of Checkbox on load Pin
Christian Graus3-Nov-05 11:04
protectorChristian Graus3-Nov-05 11:04 
AnswerRe: Dynamic setting of Checkbox on load Pin
Steve Pullan3-Nov-05 12:11
Steve Pullan3-Nov-05 12:11 
GeneralRe: Dynamic setting of Checkbox on load Pin
Steve Pullan3-Nov-05 12:21
Steve Pullan3-Nov-05 12:21 
QuestionPlease Wait.... Pin
ljc3993-Nov-05 6:03
ljc3993-Nov-05 6:03 
QuestionFinding the size of a string Pin
Mark063-Nov-05 5:59
Mark063-Nov-05 5:59 
AnswerRe: Finding the size of a string Pin
Joshua Quick3-Nov-05 7:16
Joshua Quick3-Nov-05 7:16 
GeneralRe: Finding the size of a string Pin
Mark063-Nov-05 7:57
Mark063-Nov-05 7:57 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.