Solved

Translate this code (Easy Points!)

Posted on 2006-10-25
6
195 Views
Last Modified: 2010-05-18
SOME_CONSTANT_VARIABLE = 0x12

How do I do this in VB6, and why (ergo, what does the #x## mean?)?
0
Comment
Question by:DrDamnit
  • 3
  • 3
6 Comments
 
LVL 20

Expert Comment

by:hes
ID: 17807458
Dim SOME_CONSTANT_VARIABLE
SOME_CONSTANT_VARIABLE = &h12
0
 
LVL 32

Author Comment

by:DrDamnit
ID: 17807502
what does the &h mean?
0
 
LVL 20

Accepted Solution

by:
hes earned 500 total points
ID: 17807534
That is how VB recognises the value is Hex 12
0x12 is how C recognises hex 12
0
Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

 
LVL 32

Author Comment

by:DrDamnit
ID: 17807722
One last quick question: the &h + n, is that the hex number or the decimal number? Ergo, for 11 in hex, would it be &h11 or &B?
0
 
LVL 32

Author Comment

by:DrDamnit
ID: 17807723
sorry....&hB?
0
 
LVL 20

Expert Comment

by:hes
ID: 17807900
&hB
0

Featured Post

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

860 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question