Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    Visual Basic




Excel 9 Object Library Referencing


Hey All,

I got some great input from Paul Hinds about writting to an Excel file from VB, BUT when I try to run the additions to my previously running program I get error....
Referenced memory at "0x00000000". The memory could not be "read".

My thinking is that I am supposed to add Excel 9 object library in my referenced, but all I have available is Excel 10? How do I find the 9, if this is even my problem???

P.S. This is my favorite help site, some(I won't mention, but it's initials are esri) are not friendly at all.
Cheers
Debbie




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Problem When Referencing DAO 3.6 Object Library
Hello,

I need help figuring out why this code doesn't work in DAO 3.6 Object Library.
I'm getting an "invalid password" error message

my code is as follows:
set ws = dbengine.workspaces
set db = ws.opendatabase(Appath + "tablename", false, false, "MS Access; PWD=MAPTURF")

Everything works ok when DAO 2.5/3.51 compatibility library as referenced.

Thanks

Referencing Microsoft Access Object Library
i m using a reference to Microsoft Access Object Library that references MSACC.OLB my question is in order to redistibute my application do i have to make as requirement that the client machines to have access install or i can make an install program just including that file?

thnks

Referencing Different Excel Object Libraries In Vb6
Hi,
I am building a vb application, for processing data from excel spreadsheet. I have my user group using both office 2k7 and office 2k3. So I am facing issue in using reference in my application for accessing the excel spreadsheet. Is there any way to make it generic so that it work without any issue when there is Microsoft Excel 11.0 library and Microsoft Excel 12.0 library.
Its not allowing me to select both the reference while building the application.
Thanks,
Subbu S

Microsoft Office Object Library Excel 2003 And Excel 2000
Ciao Gurus,

I have developed an application with excel 2003 and, of course, it takes as reference the library of excel 2003, but most of the users have excel 2000 and the application goes in error when this reference is called. The library is Microsoft Outlook that in excel 2003 is 11.0 version while in excel 2000 is 9.0.
How can I fix the problem?
Best Regards
KAIALA


 

Edited by - kaiala on 7/2/2007 3:21:56 AM

Excel Object Library
does someone knows where can I download the excel object library for excel 2000?

Excel Object Library
I am using VB6 and make a reference to the excel object library 8.0 in my program. If someone uses the program with Excel X, will the program still work?

Is there a way to reference all the excel librarys(sp?), Excel Object Library 8.0, 9.0 and 10.0?


Thanks for the help.

Excel Object Library
I'm developing an application which will run using Excel 97 but the PC I'm developing on has Excel 2000 installed. Will that give me trouble or how do I make sure that my app will be ok with 97?

Excel Object Library, Plz Help!!!
Hello, I want to calculate a math expression using the ms excel object library.
First, I add a reference (Project -> Add Reference->COM) to the Microsoft Excel 10.0 Object Library, then I write following code:

Public Class Form1
....
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim EXL As New Excel.Application()
' I want to evaluate 5*3+1
EXL.Evaluate("5*3+1")
End Sub
End Class

And the following message appears when I run the program:
An unhandled exception of type 'System.Runtime.InteropServices.COMException' occurred in WindowsApplication3.exe

Additional information: Old format or invalid type library.

Could you please help me?? Do I make sth wrong?How could I fix it??
Thank you in advance?

Excel Object Library
hi
i am using vb 6.. installed excel 2000 in my machine.. but in references there is nothing named microsoft excel object library.. what is the problem.. does it requires re-installation of vb or excel or copying some files alone may help.. if so what files..

Excel 8 Object Library
Within my program I am accessing data from an Excel 97 spreadsheet. To do this I am using the Excel.Application, Excel.Workbook and Excel.Worksheet objects. I have added a reference to the Excel 8 object library, and all works fine.

However, I installed the program on another PC. This one does not have Office installed on it, but I made sure to check that excel8.olb got installed in the system32 folder (it's an NT box). When I try to run the program on this machine, it crashes with error 429: ActiveX component can't create object. This crash happens when it tries to instantiate the Excel.Application object.

Can anyone suggest why this is happening and post a solution? It would be much appreciated, and it's quite urgent. Thanks.

Excel 11 Or 12 Object Library In VB6
Hi,

I use VB6 to read data from Access and populate data on Excel Worksheets.

Currently I have Office 2003 installed on my development computer so in VB6, I use Microsoft Excel 11.0 Object Library reference.

In some cases, my customers may install Office 2007 on their own and use my VB application. Here are my questions:

1) If I compile my VB application with Excel 11 Object Library, will there be any problems to run the application on any machines with Excel 2007 (especially for creating and formating chart objects)?

2) If I install Office 2007 with Excel 12 Object Library on my development machine, then I compile my VB application. Should it work on any computers with Excel version 2000 to 2007? I think so but want to make sure.

3) Instead of installing Office 2007 on my computer, is there any Excel 12 Object Library plug-in which I can download and register on my computer so I can still compile my VB application?

Appreciate for any inputs.

Jeff

Excel 11 Or 12 Object Library For VB6
Hi,

I use VB6 to read data from Access and populate data on Excel Worksheets.

Currently I have Office 2003 installed on my development computer so in VB6, I use Microsoft Excel 11.0 Object Library reference.

In some cases, my customers may install Office 2007 on their own and use my VB application. Here are my questions:

1) If I compile my VB application with Excel 11 Object Library, will there be any problems to run the application on any machines with Excel 2007 (especially for creating and formating chart objects)?

2) If I install Office 2007 with Excel 12 Object Library on my development machine, then I compile my VB application. Should it work on any computers with Excel version 2000 to 2007? I think so but want to make sure.

3) Instead of installing Office 2007 on my computer, is there any Excel 12 Object Library plug-in which I can download and register on my computer so I can still compile my VB application?

Appreciate for any inputs.

Jeff

Various Excel Object Library
Hi folks

I made a small app to automate an excel spreadsheet from vb 6.0. it works fine when i run the program in the comp that has visual basic. I'm making the application in vb 6.0 SP5 in windows XP with Office XP.
When I created a setup using package and deployment wizard for that program and install it on Windows 98 with Office 97 or 2000 it doesn't run and gives me this error

"Run time error '-2147023067 (80070725)':Automation error

After looking at on various forums I decided to to try a better setup tool (Wise 5.1 and Installshiel 8). But I got the same result.

I know that Office XP is shipped with a different version of Object Library than Office 2000 or 97 (version 9 for Office 2000 and 10 for XP), so because my app has the 10.0 object version as a reference the program doesn't work.

I don't want to run multiple versions of Office on my computer or create different distribution depending the OS and Excel version.

I don't know if it is possible but I would like my setup to be able to install the right version of Object Library (8, 9 or 10) depending the target computer.

does it the right way to deal with this problem? Any other idea?

Thanks in Advance

Yann

Excel 8.0 Object Library
Hi ,

Anyone knows how to format an Excel column as Text before moving data to it
I was trying to move "2.10" to Excel as a string, but Excel misunderstands
that my data is numeric and it rounds it up to "2.1"

Thanks

Excel 8.0 Object Library
Hi,

I was trying to read Excel spreadsheets using Excel Object Library, and the
file is big (2 sheets , each has around 2000 rows).

I was some where near the end of my reading process when everything seems
to be hanging. I press Ctrl+Alt+Delete : evrything is not responding

And I've got Component Request Pending
message: "This action can not be completed because the application is busy.
Choose "Switch to " to activate the busy application and correct the problem"

I end up closing everything and have to reboot my computer.

Thanks for any help.

Excel Object Library
Hi

I want to append 1 more Sheet to my Workbook.
And I have trouble using :

dim MyWorkbook as Workbook
MyWorkbook.Worksheets.Add ([Before],[After],[Count],[Type]) as Object

What am I supposed to pass to [Before] or [After] ?

Thanks

Excel Object Library Reference
I have an Excel add-in program that is coded in VBA. It works fine until I loaded a vender's software. Now the add-in won't compile. It can't reference the workbook, worksheets and range objects. The reference is still set to the Excel 9.0 object library.

I have reinstalled Office and uninstalled the vender program. The uninstall said that not all components of the vender program were removed. The add-in still won't compile.

Any idea what the problem is?

Excel 8.0 Object Library Problem
I'm using VB 6 and I'm trying to write a program that will automate some Excel functions. I can open a new Excel Application and close it fine from within VB, but everytime I try to do some manipulation of the cells, rows, or columns I get an Automation Error -2147417848 (80010108).

The program works on another computer in the office (and I think the only difference is that it's running Windows Xp and mine is on 98, but it still uses VB 6 and MS Office 97). This made me think maybe my Excel 8.0 Object Library was corrupt. I've just recently uninstalled and reinstalled the Entire MS Office 97 suite. I get the same problem.

The following program demonstrates functions I'm trying to run and my methodology for doing so:


Code:
Private myExcel As Excel.Application
Private myWorkBk As Excel.Workbook


Private Sub Command1_Click()
Set myExcel = New Excel.Application
Set myWorkBk = myExcel.Workbooks.Add()
myExcel.Visible = True
myExcel.UserControl = False

End Sub

Private Sub Command2_Click()
Dim myrange As Excel.Range
Set myrange = myExcel.Range("A3:A7")
myrange.Formula = "Some Text" // <---- Errors Here
End Sub

Private Sub Command3_Click()
myExcel.Range("A3:A7").Copy myExcel.Range("D3:D7") // <---- Errors Here
End Sub

Private Sub Command4_Click()
myExcel.Quit
End Sub
I can click Buttons 1 and 4 all day long without a problem, but if I click 2 or 3 I get the automation error. Any help you can provide would be much appreciated.

Excel Object Library W/ VB6. Need Some Help/examples
After searching around the forums, I found a reference to the Excel Object library and some starting code:


Code:
Dim exl As Excel.Application
Set exl = New Excel.Application

etc..

How to I use the Excel Object Libary to just open Excel? (so I have a new workbook open to start interacting with). Every example I can find shows an existing sheet being open.

With what I'm doing I can not open an existing workbook or save a workbook. I just need Excel to open with a new blank workbook that I can use (interacting with it like the VB6 is really Excel VBA... all the good stuff).


Anyone have any good examples or links for the Excel Object Library?


Thanks...

Help Meee. Excel Object Library
i had vb 6 and excel 2000 installed in my machine.. found no excel object library in references.. then installed excel-97.. now found excel object lib 5 and 9..

my code goes like that
Dim objWrkSht As New Worksheet
dim X As Integer
Set objExcel = CreateObject("Excel.Application")


when 5 is used at
Dim objExcel As New Excel.Application
it displays
invalid use of new keyword

when 9 is used at
Set objExcel = CreateObject("Excel.Application")
it displays
variable uses automation type not supported in vb

wot is the problem.. i cant do any work becoz of that.. please reply me

Microsoft Excel Object Library
Where can I get Excel Object Library? I have Excel 2000, I have vb 6, I cannot find the Excel Library...

Microsoft Excel 8.0 Object Library
could you tell me where i can download this library?
For ocx controls we never seen before is there any way of getting some info on it??

Loading Excel Object Library
Fairly new to this!

I want to use Excel functions in VB6, like NORMDIST (normal distribution) etc, and in a post by wdb on 4/11/2002, one way might be to load Excel object library into my project - but I can't see how to do this!

I've looked in the Project menu / Components / Controls, and can't see any .dll or .ocx, or anything that refers to Excel.

Running Office XP, WIndows XP, VB6 Pro with SP5.

Any ideas please?

Thanks.



 

Microsoft Excel 11.0 Object Library Question
is there a way to view the compnents of Microsoft Excel 11.0 Object Library. Like a read out of all avaliable objects and properties etc...?

Thanks,
Nooch

Excel Object Library Causes My Subs To Fail
I turned on the Excel object library (in the lowest priority position) and now a couple of my subs don't work. I at first thought that it was something to do with the names of the subs conflicting with the names of some of the methods of Excel Objects, so I changed the following names:

closeMenus
openMenus

to:

closeDecisionMenus
openDecisionMenus

But I still got the same error message (type mismatch). As soon as I turned off the Excel object library they worked again. Any ideas?

Here is the script for the subs

Public Sub closeDecisionMenus(ByRef theToolbar As Toolbar)
'This sub-routine disables the menus that should only be available when the user has a project open

Dim i As Long

For i = 1 To theToolbar.Buttons.Count
If Not theToolbar.Buttons.Item(i).Caption = "File" And Not theToolbar.Buttons.Item(i).Caption = "About" Then
theToolbar.Buttons.Item(i).Enabled = False
End If
Next i

i = Empty

End Sub

Public Sub openDecisionMenus(ByRef theToolbar As Toolbar)
'This method enables all menus in the project:

Dim i As Long

For i = 1 To theToolbar.Buttons.Count
theToolbar.Buttons.Item(i).Enabled = True
Next i

i = Empty

End Sub

Microsoft Excel Object Library Question
Hello everybody

I`d like to know if the Microsoft Excel 11 Object Library, installed by Microsoft Office 2003, can be used on machines which might have another version of Microsoft Office installed.

Excel Object Library Compatability Issues???
Quick question for any who know.

I have almost finished writing an app for reading the data out of XLS files and writing to a DB. All is working well (in thanks to people here) but I am concerned about compatability.

If the system I am installing on has an older or newer version of excel installed will this have any effect?

I wrote my app with the Excel 8.0 object lib (office 97) but users may be on office 95 (excel 5) or office 2000 (excel 9) I'm only using the RANGE and WORKBOOK objects but would like to hear more before distribution.

Thanks

Excel: Object Library Switching From 2000 To XP
I have an Excel workbook that was written with Excel 2000 that has references to, among others, Microsoft Word 9.0 Object Library. When the workbook is opened and saved with Excel XP, all 9.0 object library references change to 10.0. When the book is reopened in 2000 all references change back to 9.0 except the Word library, which causes a MISSING: Microsoft Word 10.0 Object Library error.

Using

ThisWorkbook.VBProject.References.AddFromGuid "{00020905-0000-0000-C000-000000000046}", 1, 0

to programmatically call the Word object library in the ThisWorkbook object works, but if an XP user saves the workbook it still causes the MISSING error for 2000 users. Plus, since VBA was changed, my digital certificate is dropped and everyone has to enable macros again.

To eliminate this problem I changed

Dim wdObj As Word.Application
Set wdObj = New Word.Application

to

Dim wdObj As Object
Set wdObj = CreateObject("Word.Application")

but now I don't have access to Word's formatting abilities.

I'm sure I could create a Word template and replace placeholders, but I'd prefer to generate the entire document on the fly. I'm hoping there's a way around this problem. Any ideas?

Thanks in advance.
Dave Kazebeer

Missing Microsoft Excel 8 0 Object Library
A customer gave me code to download, and I am getting the following error. I do not have Excel loaded on my machine -- is there any way that I can just download the Excel object library ? Or do I need to be running a version of Excel ?

ToolBar1 && Microsoft Excel 12 Object Library Does Not Get Along?
Hi there, I have a project using Toolbar, and has being working great for such a long time.

Know i decided to make some improvements to my program, and one of the improvements is to export data on a MSFlexgrid to Excel. For that, i needed to add Microsoft Excel 12.0 Object Library.

When i run the program it appers to be a mistake on a SUB wich reads something like this:

The declaration of the procedure does not match  with the description of the event or the procedure that has the same name.

The problem seams to be here:

Private Sub Barra_ButtonClick(ByVal Button As Button)

Where Barra is the name of the control Toolbar and the event is to catch the Button pressed.


The fact is, if I erase the Barra_ButtonClick Sub the Excel exporting works just fine.

Or

If i Take out the Object Library the ToolBar Event works great.

What can that be?

Please help more than apreciated!
 

VB 6.0 MS Excel Object Library 10.0 And Toolbar Problem
Hi! I'd appreciate if anyone could help me ....

Referencing to Microsoft Excel 10.0 Object Library will generate Run time error 13 "Type Mismatch" at
Set btnX = Toolbar1.Buttons.Add(, "open", , tbrDefault, "open") line below but if MS Excel Object library 10.0 is unreferenced in my vb 6.0 prj, the toolbar works fine. I need to reference MS Excel Object Library 10.0 and the toolbar buttons. What can I do to eliminate this run time error?


Private Sub Form_Load()
' Create object variable for the ImageList.
Dim imgX As ListImage


'Load pictures for the Toolbar buttons into the ImageList
'control.
Set imgX = ImageList1.ListImages. _
Add(, "open", LoadResPicture(101, vbResBitmap))

Set imgX = ImageList1.ListImages. _
Add(, "save", LoadResPicture(102, vbResBitmap))

Set imgX = ImageList1.ListImages. _
Add(, "exit", LoadResPicture(103, vbResBitmap))

Toolbar1.ImageList = ImageList1

' Create object variable for the Toolbar.
Dim btnX As Button

' Add button objects to Buttons collection using the Add method.
' After creating the button, set the Description and ToolTipText
' properties.

' Create Open Button
Set btnX = Toolbar1.Buttons.Add(, "open", , tbrDefault, "open")
btnX.ToolTipText = "Open"
btnX.Description = btnX.ToolTipText

' Create save Button
Set btnX = Toolbar1.Buttons.Add(, "save", , tbrDefault, "save")
btnX.ToolTipText = "save"
btnX.Description = btnX.ToolTipText

' Create Exit Button
Set btnX = Toolbar1.Buttons.Add(, "exit", , tbrDefault, "exit")
btnX.ToolTipText = "Exit"
btnX.Description = btnX.ToolTipText

With Toolbar1
.Wrappable = True ' Buttons can wrap.
End With
End Sub

Private Sub Toolbar1_ButtonClick(ByVal Button As MSComctlLib.Button)
' Use the Key property with the SelectCase statement to specify
' an action.
Select Case Button.Key
Case Is = "open"
Call cmdFileSelect(blnSndpath)
Case Is = "save"
Call cmdInsert(blnSndpath)
Case Is = "exit"
Call cmdQuit
End Select

End Sub



Thank's in advance!

Speed Whan Working With A Excel 10.0 Object Library
I’m busy working on an application that saves data into a SQL database through a front-end. I am busy creating a system to export this data into a spreadsheet when needed so that it can be saved as a document by the user when needed using the Excel object 10.0 Object Library.
I am finding this whole process painfully slow as editing 100 odd cells is taking over a minute, and I’m sure this will exponentially increase as more data needs to be put onto the spreadsheets.
Below is a simplified copy of the code i am using.


VB Code:
Dim xls As ObjectSet xls = CreateObject("Excel.Application")xls.Workbooks.Open Filename For n = 0 To 52xls.Range("G" & N + 12).Value = RsProjects.Fields(N + 6 + 53 + 53 + 53 + 53)next n xls.Visible = True


Is there any way of speeding this process up or perhaps even using another method I am unaware of

Any comments are appreciated
Thank you in advance

Microsoft Excel 10.0 Object Library And Toolbar Problem
Referencing to Microsoft Excel 10.0 Object Library will generate compile error: Run time error 13 "Type Mismatch" at
"Set btnX = Toolbar1.Buttons.Add(, "open", , tbrDefault, "open")" code below. Please, help if you can, Thank's.


Private Sub Form_Load()
    ' Create object variable for the ImageList.
    Dim imgX As ListImage


    'Load pictures for the Toolbar buttons into the ImageList
    'control.
         Set imgX = ImageList1.ListImages. _
            Add(, "open", LoadResPicture(101, vbResBitmap))

         Set imgX = ImageList1.ListImages. _
            Add(, "save", LoadResPicture(102, vbResBitmap))

         Set imgX = ImageList1.ListImages. _
            Add(, "exit", LoadResPicture(103, vbResBitmap))

    Toolbar1.ImageList = ImageList1

    ' Create object variable for the Toolbar.
         Dim btnX As Button

    ' Add button objects to Buttons collection using the Add method.
    ' After creating the button, set the Description and ToolTipText
    ' properties.

    ' Create Open Button
         Set btnX = Toolbar1.Buttons.Add(, "open", , tbrDefault, "open")
            btnX.ToolTipText = "Open"
            btnX.Description = btnX.ToolTipText

    ' Create Save Button
         Set btnX = Toolbar1.Buttons.Add(, "save", , tbrDefault, "save")
            btnX.ToolTipText = "save"
            btnX.Description = btnX.ToolTipText

    ' Create Exit Button
         Set btnX = Toolbar1.Buttons.Add(, "exit", , tbrDefault, "exit")
            btnX.ToolTipText = "Exit"
            btnX.Description = btnX.ToolTipText

    With Toolbar1
            .Wrappable = True ' Buttons can wrap.
         End With
End Sub

Private Sub Toolbar1_ButtonClick(ByVal Button As MSComctlLib.Button)
    ' Use the Key property with the SelectCase statement to specify
    ' an action.
    Select Case Button.Key
        Case Is = "open"
         Call cmdFileSelect(blnSndpath)
    Case Is = "save"
         Call cmdInsert(blnSndpath)
    Case Is = "exit"
         Call cmdQuit
   End Select

End Sub

If Add Reference To Excel 9.0 Object Library And Set Button On Toolbar , Error
Hi, i am getting error if i add reference to Microsoft Excel 9.0 object library

1. add reference to Projext->Reference and select Microsoft Excel 9.0 object library
2.add one toolbar on form1
3. Run the following code

Private Sub Form_Load()
Dim btnX As Button
Toolbar1.Buttons.Add (1)
Set btnX = Toolbar1.Buttons(1)
End Sub

if you remove the reference then everything will work fine but if add reference then type mismatch error


why these error is occuring ?

Project Reference, "MISSING: Microsoft Excel 10.0 Object Library"
I am writing a program that requires the Microsoft Excel 10.0 Object Library.  I just moved the project to a new development machine that does not have Microsoft Excel installed on it, and I do not have my Excel cd with me here.  Is there anyplace that I can get download the object library, or will I have to wait until I have the cd with me?


Object Library Invalid Or Contains References To Object Definitions That Could Not Be Foun
Does anyone what this message mean:
"Object library invalid or contains references to object definitions that could not be found"

I tried to compile a VBAproject and I got this message.

*RESOLVED* Identify Object Library To Which Object Belongs
Hi,

I have inherited a VB6 application which was written by someone who is no longer with the company.

I need to distribute his application but I have noticed that he used some objects from the Forms2 object library.

As you are not allowed to distribute applications that use this library, I have to work through his application and replace forms2 objects with others.

I have replaced the obvious ones (spin button) but when I try to remove the Forms2 component from the project, it tells me that some controls are still in use.

How can I tell which objects belong to the Forms2 library?

As always, any help greatly appreciated.

Referencing An Object By Its Name
How can i have a reference on an object with a string filled with its name ?
I have "ObjectName" and i want ObjectName to use ObjectName.Method() ...
In fact, i fill a property (Variant type) in Design Mode.
But it returns in my "Property Let" code a String and not an Object

Referencing Object
Hi,

I need to use FileSystemObject in VB code. So I add "Microsoft Scripting Runtime" to the Reference dialog box under Project. But when I test the application I still get the following error message:

Compile error:
Cannot find project or library.

What else should be done to get the error away?

Thank you very much!
Cristal

Referencing A Calling Object
I am trying to figure out how to reference the name of the object that is currently executing. In this example, I have a form, in which there is a multipage object. On one of the pages is a text label. When I click on the label, I want to call a function that changes the color of the text. Since I will have a lot of labels, it's important to me that I don't need to code in the name of the object as I call the "changecolor" function - I would like it to be passed dynamically, based on the name of the label that I clicked. In the example below, what do I need to replace the question marks with "???" so that it references the object (e.g. "label1")? Thanks!!

(by the way, if I use the "Me" keyword, it references the multipage object, and not the label object)


---------------------------------
Private Sub Label1_click()
changecolor (???)
End Sub
---------------------------------


---------------------------------
function changecolor(MyObj as Object)
MyObj.Forecolor = RGB (25,25,25)
end function
---------------------------------

Copying An Object Instead Of Referencing
I want to copy an instance of an object instead of just referencing it, so that the two objects are independant of eachother.

How is this accomplished?

Referencing An Object At Runtime
Hi,
Is there a way to add a Reference to any DLL file or object at run-time.

.............
Rohit.

Referencing Object Libraries
This is a really pedestrian question I know, but I want to write stuff to an Excel spreadsheet, insert rows, etc.

How do I reference Excel object libraries to do this?

Problem Referencing An Object
I have the following code:

public frmCustomerList as new CustomerList

private Sub mnuMaintenanceCustomers_Click()
set frmCustomerList = new CustomerList
frmCustomerList.PopulateList
frmCustomerList.Show
End Sub



In frmCustomerList is a command button that creates frmCustomerEdit. In that object is a line of code where I again call the method:
frmCustomerList.PopulateList
When that block of code runs I get a compiler error that frmCustomerList is not defined.

Also, when I declare an object as Public, why doesn't it appear in the Locals window as it would if I Dim it.

Referencing The Object By The Called Procedure.
Hi,
I have roughly 80 combo boxes each named by their grid reference. ie 00(top left) 99(bottom right) 12(first row, second column) etc.

I'm trying to figure out a piece of code i can use to calculate the whole row, and put the result into totalX where X corresponds to the row number.

Instead of having to write out 80 of the following bits of code:

Code:Private Sub Ctl40_AfterUpdate()
temp = updatets(4, 0, Me.Ctl40, total0)
End Sub

I want to be able to use something like the following but i don't know what to put the place of 'theobject'
Code:
temp = updatets(Left(theobject.Name), Right(theobject.Name, 1), theobject, Eval("total"& Right(theobject.Name, 1))

This way i can paste in the same line for every control and it will get the numbers from the name of the object.

This might be the long way or the crap way.. so if anyone understand what i'm trying to do and knows a better way let me know. Can i put these controls into an array??

thanks,
Jake



Edited by - Archerdapunk on 5/5/2004 10:09:50 PM

Referencing Access Object Properties
How would one return a list of all Queries and their properties like Modified Date or Created Date?



To err is human. To really foul things up requires a computer.

Simple Object Creation And Referencing Question
Hi,

I'm a newbie at VB objects, and I'm refactoring and cleaning some old VB code using VB 6. The problem I'm having seems to be related to the sequence in which some events happen and referencing objects.

The code consists of MyModule, MyForm and a new MyClass I've just created. It has a property x.

In MyModule, I declare a global variable :

Global m as MyClass

and in MyForm.Load I instantiate it :

Set m = New MyClass

On MyForm I have an Option called Option1 and I'd like the click event to assign something to m.x :

Private Sub Option1_Click(index As Integer)
m.x = index
End Sub

When I try to run this code, I get an "Object Variable or With Block Variable Not Set Error". Which I suppose means that m hasn't been instantiated yet. Presumably because this is checked at some compile time before MyForm.Load is run.

So is this the right diagnosis? If so, how else can I get any control on MyForm to talk to a global instance of MyClass? Or if not, any other suggestions?

cheers

phil jones

Referencing Diff Word Object Librarys??
Okay... here is my issue.

I am developing an small utility that references the Microsoft Word 8.0 Object Library (Word97)

But I running it on work PC's that run Microsoft Word 11.0 Object Library (Word 2003).

How do I deal with this??

Thanks

Referencing Object With Variable And Removing " Char From A String
Hi

I was wondering if someone could tell me how to reference an object with the value of a variable.
Here is a typical example.

dim object as string
dim textValue as string

object = "txtJobDesc"
textValue = object.text

I know this wont work, to get it to work do I either have to put some brackets around the object reference i.e. (object).text or do i have to declare it as an object or something rather than a string or both.

I was also wondering how to make a reference to a " character i.e. if I wanted to remove a " from a string, how would I make a reference to this within the parenthesis.

i.e. replace(txtValue.text, """) this wont work ...any ideas.

Regards

Rusty

Copyright © 2005-08 www.BigResource.com, All rights reserved