#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default hex3dec

I want to make a macro that copies a cell value that is in hex, converts it to decimal, increments that number by 1, converts that number to hex and then pastes it in the cell below.

The HEX2DEC command doesnt work from VBA module????
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default hex3dec

Either that or I need to know how to get a macro to increase numbers counting in HEX....
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default hex3dec

application.Run "ATPVBAEN.XLA!Hex2DEc, Range("A1")"


from the immediate window:

Range("A1").Value = "FB"
? application.Run( "ATPVBAEN.XLA!Hex2DEC", Range("A1"))
251


so
Range("A1").Value = "FB"
vVal = application.Run( "ATPVBAEN.XLA!Hex2DEC", Range("A1"))
? vVal
251
vVal = vVal + 1

Range("A2").Value = Application.Run( "ATPVBAEN.XLA!DEC2HEX", vVal)

? Range("A2").Value
FC

--
Regards,
Tom Ogilvy




"KevGrn114" wrote in message
...
I want to make a macro that copies a cell value that is in hex, converts

it to decimal, increments that number by 1, converts that number to hex and
then pastes it in the cell below.

The HEX2DEC command doesnt work from VBA module????



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default hex3dec

In Excel, go to the Tools menu, choose Add-Ins, and select
"Analysis Tool Pak VBA". This will load the ATPVBAEN.XLA add
in.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com

"KevGrn114" wrote in
message
...
Thanks again Tom, where is the ATPVBAEN.XLA supposed to be

loacated?


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



All times are GMT +1. The time now is 01:49 PM.

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

About Us

"It's about Microsoft Excel"