|
-
Oct 26th, 2001, 09:19 PM
#1
Thread Starter
Frenzied Member
Error
When I load my program i get an error that says, "Object variable or with block variable not set"..what exactly does that mean? just that i didnt set a variable and it doesnt know what to do?
-
Oct 26th, 2001, 09:25 PM
#2
Need-a-life Member
You might probably doing sth liek this:
VB Code:
Dim obj as MyClass
obj.ShowMsg "Hello"
where you should do sth like this:
VB Code:
Dim obj as MyClass
[b]Set obj = new MyClass[/b]
obj.ShowMsg "Hello"
Emiliano F. Martín
If a post has helped you then please Rate it! (and give the user points he/she deserves by clicking on the image).
Encourage the person who helped you to keep doing it, and give him the points he deserves.
MP3 Organizer: Freeware to logically organize all your MP3s.
-
Oct 26th, 2001, 09:30 PM
#3
PowerPoster
Basically means that you are trying to reference an objects properties or methods before it has been instanciated.
-
Oct 26th, 2001, 09:32 PM
#4
Need-a-life Member
-
Oct 26th, 2001, 09:35 PM
#5
Thread Starter
Frenzied Member
well i tried doing stuff in directx like...
VB Code:
dim Dx as DirectX8
dim D3D as Direct3d8
dim D3DDevice as direct3ddevice8
Private Sub Form_load()
d3ddevice.createimagesurface 1000, 1000, D3DFMT_A8R8G8B8
End Sub
and there is more code but that line gives me that error..why does it do that?
-
Oct 26th, 2001, 09:40 PM
#6
PowerPoster
Not sure which all objects are creatable or dependent objects, but try this:
Code:
dim Dx as DirectX8
dim D3D as Direct3d8
dim D3DDevice as direct3ddevice8
Private Sub Form_load()
Set d3ddevice = New direct3ddevice8 '// Create an instance of the direct3ddevice object
d3ddevice.createimagesurface 1000, 1000, D3DFMT_A8R8G8B8
End Sub
Creatable objects must be instantiated with the 'New' keyword, where as non-creatable objects are basically objects that are created within a parent object. For instance, the Folder object of the File System Objects Component.
-
Oct 26th, 2001, 09:43 PM
#7
Thread Starter
Frenzied Member
it says invalid use of procedure
-
Oct 26th, 2001, 09:43 PM
#8
Thread Starter
Frenzied Member
it says invalid use of new keyword
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
|