Welcome to A1vbcode StrugglingVBUser. StrugglingVBUser (12/9/2009) I get the following errors with this snippet of code in my program:Error 12 'Delay' is not a member of 'DigiStage.digstgMainForm'. 88 21 DigiStage Error 14 'Timer' is a type and cannot be used as an expression. 10 17 DigiStage Error 15 Name 'DoEvents' is not declared. 14 17 DigiStage Error 16 'Timer' is a type and cannot be used as an expression. 16 24 DigiStage Error 17 Name 'DoEvents' is not declared. 19 13 DigiStage Error 18 'Timer' is a type and cannot be used as an expression. 21 28 DigiStage Error 19 Name 'Form1' is not declared. 27 9 DigiStage
as you can tell I'm a newbie to VB2008, are these simple declaration errors? 1. Well the Delay Sub is set as Private in that code so it will only work in that Form. If you want to use the Delay Sub in any Form then put that code into a Module and change it to Public. 2. Timer should be able to be used that way. Timer is the number of second the computer as been running for which goes back to 0 at midnight. 3. You declare DoEvents on its own not with (). DoEvents actually returns an Integer but I haven't found a use for this value. 4. Form1 not declared. If thats the first startup Form for your app then you don't need to use this just use Me.Show in Form_Load() event. Thats if you are refering to that Form. 5. I'm not sure what 'DigiStage.digstgMainForm' is you aren't using the correct VB naming prefixes. If DigiStage is a Form then name it frmDigiStage and rename all code associated with the old name. 6. Then you have digstgMainForm is that a Form? 7. If your using VB.Net then you need to post your question in the other forum. Visual Basic .NET/2005/2008 8. I see you've used the Delay Sub from M2k. Come and join us again on the new M2k forum.
Keith
I've been programming with VB for 17 years. Started with VB4 16bit Pro, VB5 Pro, VB6 Pro/Enterprise and now VB3 Pro. But I'm no expert, I'm still learning.
|