Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Hex to Binary conversion

Tony,
I found the worksheet functions you mentioned, but I'm creating a user form
and I can't find anything like that in the VBA help files
Is there away to send the text from a text box to the worksheet, do the
conversion and then retrieve the answer back to the user form,
Something like cell A1 = txtInput and then lblAnswer = A1 after excel
calculates the answer

Julie
"acw" wrote in message
...
Julie

Excel has a builtin function for this: HEX2BIN. There is
also HEX2DEC and HEX2OCT.


Tony
-----Original Message-----
Does anyone know where I might find a VBA routine that

would convert Hex to
Binary.
I'm trying to build a userform that has several different

conversions and I
can do most of the temperature, distance and these kinds

of things, but when
it comes to the conversions I have been at it for almost

a week and I have a
huge macro that is really clunky and I'm not finished yet.
Any help please
Thanks
Julie


.



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 58
Default Hex to Binary conversion

Julie,

There is no need to use a worksheet cell to evaluate Hex2Bin.

Hex2Bin is part of the Analysis ToolPak and can be referenced directly in VBA if you create a reference to the ToolPak. In the VB
Editor, use Tools|References and check the item named atpvbaen.xls.

--

John Green - Excel MVP
Sydney
Australia


"JulieJulie" wrote in message ink.net...
Tony,
I found the worksheet functions you mentioned, but I'm creating a user form
and I can't find anything like that in the VBA help files
Is there away to send the text from a text box to the worksheet, do the
conversion and then retrieve the answer back to the user form,
Something like cell A1 = txtInput and then lblAnswer = A1 after excel
calculates the answer

Julie
"acw" wrote in message
...
Julie

Excel has a builtin function for this: HEX2BIN. There is
also HEX2DEC and HEX2OCT.


Tony
-----Original Message-----
Does anyone know where I might find a VBA routine that

would convert Hex to
Binary.
I'm trying to build a userform that has several different

conversions and I
can do most of the temperature, distance and these kinds

of things, but when
it comes to the conversions I have been at it for almost

a week and I have a
huge macro that is really clunky and I'm not finished yet.
Any help please
Thanks
Julie


.





  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Hex to Binary conversion

Just to add to John's answer, unlike worksheet functions, since this is an
addin, after creating the reference, you would call it just like a vba
function - no
Application.Hex2Bin

or

worksheetFunction.Hex2Bin

You can also not create the reference and use

? Application.run("ATPVBAEN.XLA!Hex2Bin","FB")
11111011

As an example from the immediate window.

and with the reference set:
? Hex2Bin("FB")
11111011


--
Regards,
Tom Ogilvy


"John Green" wrote in message
...
Julie,

There is no need to use a worksheet cell to evaluate Hex2Bin.

Hex2Bin is part of the Analysis ToolPak and can be referenced directly in

VBA if you create a reference to the ToolPak. In the VB
Editor, use Tools|References and check the item named atpvbaen.xls.

--

John Green - Excel MVP
Sydney
Australia


"JulieJulie" wrote in message

ink.net...
Tony,
I found the worksheet functions you mentioned, but I'm creating a user

form
and I can't find anything like that in the VBA help files
Is there away to send the text from a text box to the worksheet, do the
conversion and then retrieve the answer back to the user form,
Something like cell A1 = txtInput and then lblAnswer = A1 after excel
calculates the answer

Julie
"acw" wrote in message
...
Julie

Excel has a builtin function for this: HEX2BIN. There is
also HEX2DEC and HEX2OCT.


Tony
-----Original Message-----
Does anyone know where I might find a VBA routine that
would convert Hex to
Binary.
I'm trying to build a userform that has several different
conversions and I
can do most of the temperature, distance and these kinds
of things, but when
it comes to the conversions I have been at it for almost
a week and I have a
huge macro that is really clunky and I'm not finished yet.
Any help please
Thanks
Julie


.







Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
BIN2DEC conversion for large binary numbers ahmedmidany Excel Worksheet Functions 21 April 4th 23 11:34 AM
decimal to binary conversion tam Excel Worksheet Functions 9 November 30th 13 07:30 PM
Binary NOT? Mark Scott[_3_] Excel Worksheet Functions 4 January 24th 10 09:21 PM
decimal to 16 bits binary conversion in Excel? xcgames Excel Worksheet Functions 2 March 27th 06 12:19 AM
Solver returns non binary answer in binary constrained cells Navy Student Excel Worksheet Functions 6 September 1st 05 03:11 PM


All times are GMT +1. The time now is 03:14 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"