Visual Basic Code , VB.NET Code, VB Code
  Home   :  Code   :  Forums   :  Submit   :  Mailing List   :  About   :  Contact


pause/wait


pause/wait

Author
Message
CDRIVE
CDRIVE
Forum God
Forum God (104K reputation)Forum God (104K reputation)Forum God (104K reputation)Forum God (104K reputation)Forum God (104K reputation)Forum God (104K reputation)Forum God (104K reputation)Forum God (104K reputation)Forum God (104K reputation)

Group: Forum Members
Posts: 548, Visits: 2.6K
Like Keith said ..this looks like NET.

________________________________________________________________ 

"So much to learn. So little time to do it. Wise men know it's later than one thinks"!

Mark's Syntax.Zip    Pause Sub

I don't answer programming questions via PMs. That's what the forum is for! 

Keithuk
Keithuk
Forum God
Forum God (301K reputation)

Group: Moderators
Posts: 1.9K, Visits: 5.5K
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. Wink

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.

StrugglingVBUser
StrugglingVBUser
Forum God
Forum God (351 reputation)Forum God (351 reputation)Forum God (351 reputation)Forum God (351 reputation)Forum God (351 reputation)Forum God (351 reputation)Forum God (351 reputation)Forum God (351 reputation)Forum God (351 reputation)

Group: Forum Members
Posts: 1, Visits: 5
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
Error 20 Name 'Form1' is not declared.                                   29 9 DigiStage

as you can tell I'm a newbie to VB2008, are these simple declaration errors?

 


Keithuk
Keithuk
Forum God
Forum God (301K reputation)

Group: Moderators
Posts: 1.9K, Visits: 5.5K
Cirdan (11/12/2009)
Ah, I see; thanks, Keith!

I went to the link provided, but while I can see Mark's post about an attached project, I can't locate an attachment on the post. Or am I just missing something?

Mark's Syntax.zip is in post Post #14105 the 8th one down. Its been downloaded 1929 times its very popular.  Wink

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.

Edited
11/12/2009 by Keithuk
Cirdan
Cirdan
Forum God
Forum God (710 reputation)Forum God (710 reputation)Forum God (710 reputation)Forum God (710 reputation)Forum God (710 reputation)Forum God (710 reputation)Forum God (710 reputation)Forum God (710 reputation)Forum God (710 reputation)

Group: Forum Members
Posts: 2, Visits: 4
Ah, I see; thanks, Keith!



I went to the link provided, but while I can see Mark's post about an attached project, I can't locate an attachment on the post. Or am I just missing something?



Thanks!

Cir

"Don't follow in my footsteps; I walk into walls."
Keithuk
Keithuk
Forum God
Forum God (301K reputation)

Group: Moderators
Posts: 1.9K, Visits: 5.5K
Welcome to A1vbcode Cirdan.

I wouldn't confuse this old topic any more. We do have a VBA(Excel, Word etc) or the Visual Basic .NET/2005/2008 forum. 

Cirdan (11/11/2009)
Hey Guys,

EDIT: Not sure why the [code] block doesn't work...

The [Code] [/Code ] functions don't work correctly on this forum. As Chris has suggested we have Mark's Syntax.zip to make the VB code show correctly. Wink

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.

Cirdan
Cirdan
Forum God
Forum God (710 reputation)Forum God (710 reputation)Forum God (710 reputation)Forum God (710 reputation)Forum God (710 reputation)Forum God (710 reputation)Forum God (710 reputation)Forum God (710 reputation)Forum God (710 reputation)

Group: Forum Members
Posts: 2, Visits: 4
Hey Guys,



Thanks for the suggestions in this thread; I've been coding in VBA for years and am making the transition to VB.Net for an Attachment Processor I'm writing for Outlook. In doing so, I realized that the NewMailEx event doesn't fire on messages delivered to your mailbox while you had Outlook closed, and not all of our users run in Cached Mode.



Here's the code I used for my own delay by making use of the Timer object for 5 seconds. This allows Outlook to do what it needs to do during the delay period, then just stops and disables the timer after the first run. This works in Visual Studio 2008 and Outlook 2007. I've yet to test it on OL2k3 or OL2k.





Public Class ThisAddIn

Public timber As New Timer

'Don't use a WithEvents call here, or you won't be able to stop it.



Private Sub ThisAddIn_Startup(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Startup

timber.Interval = 5000

AddHandler timber.Tick, AddressOf timber_Initialize

timber.Enabled = True

End Sub



Private Sub timber_Initialize()

MsgBox("Because new messages may have been delivered while Outlook was closed, I must now" & vbCrLf _

& "check the most recent items delivered to ensure they are processed." & vbCrLf _

& "Thank you for your patience.")

timber.Stop()

timber.Enabled = False

InitialProcess() ' Which runs the Attachment Processor for recently-received MailItems.

End Sub



Private Sub InitialProcess()

' < your main code here >

End Sub





Considering how much reading forums like this one has helped me, I wanted to contribute by posting what I ended up using. Of course, feedback is appreciated!



Take care, everyone!

Cir



EDIT: Not sure why the [code] block doesn't work...

"Don't follow in my footsteps; I walk into walls."
Edited
11/11/2009 by Cirdan
Keithuk
Keithuk
Forum God
Forum God (301K reputation)

Group: Moderators
Posts: 1.9K, Visits: 5.5K
CDRIVE (9/25/2008)

I did know that.  Before IE7 I would either open a duplicate page in a new window or start another instance of IE. Did you read this? Wink

I've read it now. Wink

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.

CDRIVE
CDRIVE
Forum God
Forum God (104K reputation)Forum God (104K reputation)Forum God (104K reputation)Forum God (104K reputation)Forum God (104K reputation)Forum God (104K reputation)Forum God (104K reputation)Forum God (104K reputation)Forum God (104K reputation)

Group: Forum Members
Posts: 548, Visits: 2.6K
Keithuk (9/25/2008)
Welcome to A1vbcode Anni

anni (9/25/2008)
It's not possible to see your previous post while giving reply.

Yes I'm afraid thats a little glitch of this forum. You can't see previous posts when you reply, the only other way around it is have 2 browsers open and copy and paste. Wink

I thought you would have known that Chris?

I did know that.  Before IE7 I would either open a duplicate page in a new window or start another instance of IE. Did you read this? Wink

http://www.a1vbcode.com/vbforums/FindPost25775.aspx

________________________________________________________________ 

"So much to learn. So little time to do it. Wise men know it's later than one thinks"!

Mark's Syntax.Zip    Pause Sub

I don't answer programming questions via PMs. That's what the forum is for! 

Keithuk
Keithuk
Forum God
Forum God (301K reputation)

Group: Moderators
Posts: 1.9K, Visits: 5.5K
Welcome to A1vbcode Anni

anni (9/25/2008)
It's not possible to see your previous post while giving reply.

Yes I'm afraid thats a little glitch of this forum. You can't see previous posts when you reply, the only other way around it is have 2 browsers open and copy and paste. Wink

I thought you would have known that Chris?

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.

GO


Similar Topics


Reading This Topic


Login
Existing Account
Email Address:


Password:


Social Logins

Select a Forum....

















A1VBCode Forums


Search