Message 1 of 2
VBA - Problem with 64 bit

Not applicable
04-18-2010
01:54 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello everyone,
I wrote an application in VBA for AutoCAD and now I find myself with
problems in Windows 7 to 64 bits. In 32-bit is okay.
I do not know where to bang my head ... the wall is not hard enough :-((
So I ask you hoping you can help
I try to explain the problem:
The code that generates this error:
Call oML.SetBlockAttributeValue (o.ObjectID, Format (Val (TextBox1.Text)))
The code above works well in 32-bit Windows on Windows 64-bit but I have
to replace with:
Call oML.SetBlockAttributeValue32 (o.ObjectID32, Format (Val
(TextBox1.Text)))
To resolve the problem without creating two separate application I
decided to use the Is64bit emitting True if the OS is a 64-bit issues
otherwise False.
So I wrote the following code:
If Is64bit = False Then
Call oML.SetBlockAttributeValue (o.ObjectID, Format (Val
(TextBox1.Text)))
Else
Call oML.SetBlockAttributeValue32 (o.ObjectID32, Format (Val
(TextBox1.Text)))
End If
Unfortunately not enough! is detected as the wrong code and error
although IF preclude its implementation.
Can you give me some advice??
Thanks in advance.
I wrote an application in VBA for AutoCAD and now I find myself with
problems in Windows 7 to 64 bits. In 32-bit is okay.
I do not know where to bang my head ... the wall is not hard enough :-((
So I ask you hoping you can help
I try to explain the problem:
The code that generates this error:
Call oML.SetBlockAttributeValue (o.ObjectID, Format (Val (TextBox1.Text)))
The code above works well in 32-bit Windows on Windows 64-bit but I have
to replace with:
Call oML.SetBlockAttributeValue32 (o.ObjectID32, Format (Val
(TextBox1.Text)))
To resolve the problem without creating two separate application I
decided to use the Is64bit emitting True if the OS is a 64-bit issues
otherwise False.
So I wrote the following code:
If Is64bit = False Then
Call oML.SetBlockAttributeValue (o.ObjectID, Format (Val
(TextBox1.Text)))
Else
Call oML.SetBlockAttributeValue32 (o.ObjectID32, Format (Val
(TextBox1.Text)))
End If
Unfortunately not enough! is detected as the wrong code and error
although IF preclude its implementation.
Can you give me some advice??
Thanks in advance.