Apr 23rd, 2006, 08:20 PM
#1
[RESOLVED] [1.0/1.1] Reference Errors? Help Me, Gimme Code :lol:
Why cant I do this without getting the described errors?
Error 1:
Form1.cs(84): 'Outlook_Email_CS.Form1.moApp' denotes a 'field' where a 'class' was expected
Error 2:
Form1.cs(85): An object reference is required for the nonstatic field, method, or property 'Outlook_Email_CS.Form1.moApp'
VB Code:
public class Form1 : System.Windows.Forms.Form
{
private System.Windows.Forms.Button button1;
/// <summary>
/// Required designer variable.
/// </summary>
private Microsoft.Office.Interop.Outlook.Application moApp;
private System.ComponentModel.Container components = null;
[STAThread]
static void Main()
{
Application.Run(new Form1());
[color=red]moApp.Quit(); 'Error 1
moApp = null;[/color] 'Error 2
}
Thanks
VB/Office Guru™ (AKA: Gangsta Yoda ™ ® )
I dont answer coding questions via PM. Please post a thread in the appropriate forum.
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it!
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6
Apr 23rd, 2006, 08:26 PM
#2
Re: [1.0/1.1] Reference Errors? Help Me, Gimme Code :lol:
You don't have an instance of the object.
Code:
moApp = new Microsoft.Office.Interop.Outlook.Application();
or something like
Code:
moApp = this.ActiveExplorer().Application;
HTH
Every passing hour brings the Solar System forty-three thousand miles closer to Globular Cluster M13 in Hercules -- and still there are some misfits who insist that there is no such thing as progress.
Apr 23rd, 2006, 08:30 PM
#3
Re: [1.0/1.1] Reference Errors? Help Me, Gimme Code :lol:
I set it in the form load event because I didnt want to create it at the declaration line. Is this wrong for C#?
VB Code:
private void Form1_Load(object sender, System.EventArgs e)
{
moApp = new Microsoft.Office.Interop.Outlook.Application();
}
VB/Office Guru™ (AKA: Gangsta Yoda ™ ® )
I dont answer coding questions via PM. Please post a thread in the appropriate forum.
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it!
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6
Apr 23rd, 2006, 08:54 PM
#4
Re: [1.0/1.1] Reference Errors? Help Me, Gimme Code :lol:
Nope, that should work fine.
I see the problem now.
Main is static method -- you are referencing moApp, which is a non-static variable inside of it.
I think you should destroy moApp in your form's destructor of form_closed event.
Every passing hour brings the Solar System forty-three thousand miles closer to Globular Cluster M13 in Hercules -- and still there are some misfits who insist that there is no such thing as progress.
Apr 23rd, 2006, 09:47 PM
#5
Re: [1.0/1.1] Reference Errors? Help Me, Gimme Code :lol:
Ok, its moved but now another error.
Form1.cs(99): 'Microsoft.Office.Interop.Outlook.MailItemClass.MailItemClass()' is inaccessible due to its protection level
VB Code:
private void button1_Click(object sender, System.EventArgs e)
{
Microsoft.Office.Interop.Outlook.MailItem oEmail = [color=red]new[/color] Microsoft.Office.Interop.Outlook.MailItem();
'...
VB/Office Guru™ (AKA: Gangsta Yoda ™ ® )
I dont answer coding questions via PM. Please post a thread in the appropriate forum.
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it!
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6
Apr 23rd, 2006, 09:52 PM
#6
Re: [1.0/1.1] Reference Errors? Help Me, Gimme Code :lol:
How come my closing event doesnt fire?
VB Code:
private void Form1_Closing(object sender, System.EventArgs s)
{
moApp.Quit();
moApp = null;
}
VB/Office Guru™ (AKA: Gangsta Yoda ™ ® )
I dont answer coding questions via PM. Please post a thread in the appropriate forum.
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it!
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6
Apr 23rd, 2006, 10:03 PM
#7
Re: [1.0/1.1] Reference Errors? Help Me, Gimme Code :lol:
Originally Posted by
RobDog888
How come my closing event doesnt fire?
VB Code:
private void Form1_Closing(object sender, System.EventArgs s)
{
moApp.Quit();
moApp = null;
}
Are you exiting the app using Application.Exit? If so then no Closing or Closed events will be raised. That's fixed in 2.0 with FormClosing and FormClosed, which are still raised when Application.Exit is called, replacing the Closing and Closed events.
Apr 23rd, 2006, 10:31 PM
#8
Re: [1.0/1.1] Reference Errors? Help Me, Gimme Code :lol:
No, I am clicking on the 'x' to close the form. In VB.NET this would fire the form_closing event.
VB/Office Guru™ (AKA: Gangsta Yoda ™ ® )
I dont answer coding questions via PM. Please post a thread in the appropriate forum.
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it!
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6
Apr 23rd, 2006, 10:35 PM
#9
Re: [1.0/1.1] Reference Errors? Help Me, Gimme Code :lol:
Are you sure that that method is handling the Closing event fo the form? How did you create it? Have you checked the Properties window to make sure they are linked? There's no Handles clause in C# so it isn't immediately obvious.
Apr 23rd, 2006, 10:38 PM
#10
Re: [1.0/1.1] Reference Errors? Help Me, Gimme Code :lol:
I'll check but I did fix my other error. I have no idea what I was thinking earlier.
VB Code:
Microsoft.Office.Interop.Outlook.MailItem oEmail = moApp.CreateItem(Microsoft.Office.Interop.Outlook.MailItem);
VB/Office Guru™ (AKA: Gangsta Yoda ™ ® )
I dont answer coding questions via PM. Please post a thread in the appropriate forum.
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it!
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6
Apr 23rd, 2006, 10:42 PM
#11
Re: [1.0/1.1] Reference Errors? Help Me, Gimme Code :lol:
I spoke too soon. Its giving me an error that I cant use MailItem as it denotes a class, but its actually an object.
Heres my closing event adjusted. I am not sure if the signature is correct.
VB Code:
private void Form1_Closing(object sender, System.EventArgs e)
{
moApp.Quit();
moApp = null;
}
VB/Office Guru™ (AKA: Gangsta Yoda ™ ® )
I dont answer coding questions via PM. Please post a thread in the appropriate forum.
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it!
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6
Apr 23rd, 2006, 10:56 PM
#12
Re: [1.0/1.1] Reference Errors? Help Me, Gimme Code :lol:
Originally Posted by
RobDog888
I spoke too soon. Its giving me an error that I cant use MailItem as it denotes a class, but its actually an object.
Heres my closing event adjusted. I am not sure if the signature is correct.
VB Code:
private void Form1_Closing(object sender, System.EventArgs e)
{
moApp.Quit();
moApp = null;
}
The fact that you say you don't know if the signature is correct suggests to me that you created that method manually and it is not actually handling the intended event. In the C# IDE you create event handlers in the Properties window in a method equivalent to using the drop-down lists in the code window in VB.NET (see screenshot). Both methods are available in the VB 2005 IDE, which is cool because there are times when one is a better option than the other and vice versa. If you already knew all this then forget I was here but, as I say, your language suggests otherwise.
Edit: Double-click to create a method or use the drop-down list to select from existing methods with the appropriate signature.
Attached Images
Apr 23rd, 2006, 11:01 PM
#13
Re: [1.0/1.1] Reference Errors? Help Me, Gimme Code :lol:
Yes, your right. I created the closing event myself manualy. I am still on 2003 and I dont have the property like posted so I figure something may be missing as I dont have the form closing event from the dropdown in the codebehind.
VB/Office Guru™ (AKA: Gangsta Yoda ™ ® )
I dont answer coding questions via PM. Please post a thread in the appropriate forum.
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it!
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6
Apr 23rd, 2006, 11:04 PM
#14
Re: [1.0/1.1] Reference Errors? Help Me, Gimme Code :lol:
Fixed the other error. Now just need to fix the closing event so it can properly dispose of the Outlook application object.
VB Code:
Microsoft.Office.Interop.Outlook.MailItem oEmail = (Microsoft.Office.Interop.Outlook.MailItem)moApp.CreateItem(Microsoft.Office.Interop.Outlook.OlItemType.olMailItem);
VB/Office Guru™ (AKA: Gangsta Yoda ™ ® )
I dont answer coding questions via PM. Please post a thread in the appropriate forum.
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it!
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6
Apr 23rd, 2006, 11:07 PM
#15
Re: [1.0/1.1] Reference Errors? Help Me, Gimme Code :lol:
Originally Posted by
RobDog888
Yes, your right. I created the closing event myself manualy. I am still on 2003 and I dont have the property like posted so I figure something may be missing as I dont have the form closing event from the dropdown in the codebehind.
That drop-down list just shows you all the existing methods that have the appropriate signature. To create a new event handler you double-click either the event name or the empty space where the method name will go.
As for your other error I was just coming with the solution and you beat me to it.
Apr 23rd, 2006, 11:11 PM
#16
Re: [1.0/1.1] Reference Errors? Help Me, Gimme Code :lol:
Ill try what you suggested but is there any way to shorten the Outlook objects?
I added the using at the top with "using Microsoft.Office.Interop;" but it doesnt recognize any Outlook objects unless fully qualified.
Yay, I finally beat you at something
VB/Office Guru™ (AKA: Gangsta Yoda ™ ® )
I dont answer coding questions via PM. Please post a thread in the appropriate forum.
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it!
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6
Apr 23rd, 2006, 11:16 PM
#17
Re: [1.0/1.1] Reference Errors? Help Me, Gimme Code :lol:
Ok, I finally got the freaking event to be created. It was an incorrect signature too. Damn event icon button on the properties window (HOW BLIND AM I?). Why cant they just have the events avalable like in VB.NET?
VB Code:
private void Form1_Closing(object sender, System.ComponentModel.CancelEventArgs e)
Any idea on shortening the Office qualification?
Attached Images
VB/Office Guru™ (AKA: Gangsta Yoda ™ ® )
I dont answer coding questions via PM. Please post a thread in the appropriate forum.
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it!
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6
Apr 23rd, 2006, 11:35 PM
#18
Re: [1.0/1.1] Reference Errors? Help Me, Gimme Code :lol:
Did you perhaps not look too closely at the screenshot I posted earlier?
The equivalent of "Imports" from VB is "using", so at the top of your code file add:
Code:
using Microsoft.Office.Interop.Outlook;
Apr 23rd, 2006, 11:38 PM
#19
Re: [1.0/1.1] Reference Errors? Help Me, Gimme Code :lol:
Yup, I know about that but its still not working. This is like pulling teeth.
VB Code:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using Microsoft.Office.Interop;
And it will give an error that Outlook.Application is undefiuned in my code.
VB/Office Guru™ (AKA: Gangsta Yoda ™ ® )
I dont answer coding questions via PM. Please post a thread in the appropriate forum.
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it!
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6
Apr 23rd, 2006, 11:41 PM
#20
Re: [1.0/1.1] Reference Errors? Help Me, Gimme Code :lol:
Originally Posted by
RobDog888
Why cant they just have the events avalable like in VB.NET?
I know that this was at least partly rhetorical but I'll give an explanation anyway. The drop-down lists in the VB code window are for all member variables declared WithEvents. You can declare a variable manually in code as WithEvents and it will appear in that list. It has no specific connection with the designer, except that every object added in the designer is declared WithEvents automatically. There is no WithEvents or Handles equivalents in C# so that doesn't apply. You are provided a method for creating event handlers for objects added in the designer as a time saver. Like I said, both mechanisms are available in VB 2005 and I find them both useful. One of the good things about the Properties window is that you can add a single event handler for multiple objects just as you can set the same property for multiple objects: just select them all in the designer and double-click the name of the event. This creates one method with all the objects listed in the Handles clause. You can also then use it to select existing methods for other events with compatible signatures.
Apr 23rd, 2006, 11:46 PM
#21
Re: [1.0/1.1] Reference Errors? Help Me, Gimme Code :lol:
Thanks for the explaination. Hopefully as I write a couple more C# projects the pieces will start to come together.
I dont know why the "using" isnt linking the Outlook.Application code to it. It should be working.
VB/Office Guru™ (AKA: Gangsta Yoda ™ ® )
I dont answer coding questions via PM. Please post a thread in the appropriate forum.
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it!
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6
Apr 23rd, 2006, 11:47 PM
#22
Re: [1.0/1.1] Reference Errors? Help Me, Gimme Code :lol:
You cannot use unqualified namespaces in C#. You can only use unqualified types. There is no namespace named "Outlook". Try:
Code:
using Outlook = Microsoft.Office.Interop.Outlook;
Then "Outlook" becomes an alias for "Microsoft.Office.Interop.Outlook", so by using "Outlook" you are actually using the fully qualified name by proxy.
Apr 23rd, 2006, 11:54 PM
#23
Re: [1.0/1.1] Reference Errors? Help Me, Gimme Code :lol:
Yup, that did it.
Thanks for all the help guys
VB/Office Guru™ (AKA: Gangsta Yoda ™ ® )
I dont answer coding questions via PM. Please post a thread in the appropriate forum.
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it!
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6
Apr 23rd, 2006, 11:56 PM
#24
Re: [RESOLVED] [1.0/1.1] Reference Errors? Help Me, Gimme Code :lol:
Please use better thread titles in future. "Plzzzzzzzzz help me. Gimme code." would have been more appropriate.
Apr 24th, 2006, 02:01 AM
#25
Re: [RESOLVED] [1.0/1.1] Reference Errors? Help Me, Gimme Code :lol:
I thought I did give a sensible thread title
VB/Office Guru™ (AKA: Gangsta Yoda ™ ® )
I dont answer coding questions via PM. Please post a thread in the appropriate forum.
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it!
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6
Apr 25th, 2006, 06:56 PM
#26
Re: [RESOLVED] [1.0/1.1] Reference Errors? Help Me, Gimme Code :lol:
Hey Rob,
If you want to see how your function is attatched to the event handler, one thing you can do is let the IDE generate a handler for you, then right click it and do a Find all references.. You should be able to find where the event handler is assigned. Usually it's in the form designer generated code something along the lines of:
Object.Event += EventHandlingFunction
(which is also the format you use when adding event handlers in code)
This type of functionality replaces the Handles and Addhandler bit in VB.
Bill
Apr 25th, 2006, 07:48 PM
#27
Re: [RESOLVED] [1.0/1.1] Reference Errors? Help Me, Gimme Code :lol:
Ah, so I see. Thanks Bill.
VB/Office Guru™ (AKA: Gangsta Yoda ™ ® )
I dont answer coding questions via PM. Please post a thread in the appropriate forum.
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it!
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6
Posting Permissions
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
Forum Rules
Click Here to Expand Forum to Full Width