Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default How do I add a variable to watch in hex?

I would like to view an array of bytes from a file stream in hex. I
saw guidance awhile back which recommends using hex(varname), but this
only seems to work one byte at a time. Does anyone know how to tell
the watch window to display all info for a variable in hex?

Thanks in advance.
Dave Smith

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,163
Default How do I add a variable to watch in hex?

You could open the file as binary and read it bytewise, using hex() on each
byte; e.g. Open FilePath for Binary Read as #1

Otherwise, as far as I know, there is no built-in functionality for
conversion of arbitrary data types to their hex components. You would
probably need to parse and convert it yourself; i.e. find out how the
variable type is constructed and then break it down into its component bytes,
store each in a Byte variable, and then you could convert to hex().
--
- K Dales


"Dave" wrote:

I would like to view an array of bytes from a file stream in hex. I
saw guidance awhile back which recommends using hex(varname), but this
only seems to work one byte at a time. Does anyone know how to tell
the watch window to display all info for a variable in hex?

Thanks in advance.
Dave Smith


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default How do I add a variable to watch in hex?

Thanks K. As I re-read my post, I recognize my question wasn't clear
(the downside of doing anything at 6:20am) :-) I actually have the
file read in to an array already, I just want to view the array in hex.

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
Add Watch Gene Augustin Excel Discussion (Misc queries) 0 April 11th 10 04:33 PM
what does watch do? jordan Excel Discussion (Misc queries) 2 April 2nd 08 07:49 PM
VBA Watch Window Adam1 Chicago Excel Discussion (Misc queries) 0 February 24th 05 08:37 PM
How do I watch a variable change value during Visual Basic Code e. Stewart1234 Excel Programming 6 December 18th 04 06:53 PM
How do I run a Macro, but not watch it run? BK Excel Programming 2 July 1st 04 07:19 PM


All times are GMT +1. The time now is 05:05 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"