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?
Printable View
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?
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"
Basically means that you are trying to reference an objects properties or methods before it has been instanciated.
Thanx for the english version, Lethal... I was lookin' for the better way to explain it, but you beat me :)
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?
Not sure which all objects are creatable or dependent objects, but try this:
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.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
it says invalid use of procedure
it says invalid use of new keyword