Hello:
I have 44+ years in computers and electronics to include some programming. I am an American living in Alberta Canada. I was raised in Indianapolis, Indiana. Presently I work for the Deaf and Hard of Hearing Society as an Equipment Coordinator; in other words, I push paper. But I also get rewarded with helping those that are Deaf and Hard of Hearing obtain access to advanced technology to assist in their daily lives. Nothing like watching their faces split into a grin when they can hear sounds they had not heard in years.
I myself wear Oticon EPOQ digital Behind the Ear Hearing Aids. I can still hear without them, but I'm also a Vietnam Veteran and due to weapons fire have lost partial hearing between 800 and 4,000 Hz, or in the area of Critical Word Understanding, which is associated with female voices. I have a good reason to not hear my partner and she can't prove I heard her.

I have all the bells and whistles that go with them as well. A bluetooth streamer that is paired to my iPhone, notebook, and television. When music or audio is received by the bluetooth this information is passed to my hearing aids. I can honestly say I hear voices and music in my head.
Anyway, I joined this forum as I need help with re-learning Visual Basic. Years ago I could do a decent job in VB6, but this
VB 2008 Express edition is kicking me in the rear end.
I'm trying to learn how to use an sxternal
VB program to open an EXCEL worksheet, search for defined data such as a part number, Part Item, Cost, etc and then place that information into an EXCEL Invoice. This information would also be exported into another EXCEL workbook for statistical data that must be submitted to the government on a monthly basis. It would save time looking up information, create lesser mistakes and create a single point of reference for changes.
To start myself off, I used the example from MSDN. I set up the form as outlined and copied the sample code from the tutorial. I also added the EXCEL Preferences as directed.
I am sure most of you have seen the code so I will only add where my problem is.
__________________________________________________
PrivateSub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim oXL As Excel.Application Dim oWB As Excel.Workbook Dim oSheet As Excel.Worksheet Dim oRng As Excel.Range ' Start Excel and get Application object.
oXL = CreateObject("Excel.Application") oXL.Visible = True
' Get a new workbook.
oWB = oXL.Workbooks.Add <------- I get a Missing Exception Error here. oSheet = oWB.ActiveSheet 'Add table headers going into cell by cell.
oSheet.Cells(1, 1).Value = "First Name"
oSheet.Cells(1, 2).Value = "Last Name"
oSheet.Cells(1, 3).Value = "Full Name"
oSheet.Cells(1, 4).Value = "Salary"
'Format A1:B1 as bold, vertical alignment = center.
With oSheet.Range("A1", "D1")
.Font.Bold = True
.VerticalAlignment = Excel.XlVAlign.xlVAlignCenter <---- Here I get an error that XlVALign is not part of EXCEL.
EndWith
'Create an array to set multiple values at once.
Dim saNames(5, 2) AsString
saNames(0, 0) = "John"
saNames(0, 1) = "Smith"
saNames(1, 0) = "Tom"
__________________________________________________ ______
Has anyone seen this error before?
Any help would be greatly appreciated as I need to move forward with this project.
Tony