LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Help me please


hey all,

i had to write a program a while ago, actually in C, that is able t
convert for example a dec in hex or any other number in binary, hex
oct....now i am having problems with writing the same in VBA. it woul
be great if somebody could post a code of a small VBA program that ca
convert any numbers.
Heres the code of the C program, just to get you an idea of what i a
talking about. Sorry for my bad english but i am from austria.

thanks again, darcus

#include <stdio.h

void main ()
{
/* Variable (Zeichen) definieren */
unsigned char cZeichen;
printf("\nBitte geben Sie ein beliebiges Zeichen ein: "); scanf("%c"
&cZeichen);
/* Anlegen einer Tabelle zur Umrechnung des eingegebenen Zeichens */
printf("\n-----------------------------------------------------------------");
printf("\n|\tASCII\t|\tDez.\t|\tHex.\t|\tOkt.\t|\n ");
printf("\-----------------------------------------------------------------\n");
/* Berechnung des gesuchten Wertes für eingegebenes Zeichen */
printf("\|\t%c\t|", cZeichen); /* Ausgabe des oben eingegebene
Zeichens in ASCII */
printf("\t%d\t|", cZeichen); /* Ausgabe des eingegebenen Zeichens al
Dezimalzahl */
printf("\t%x\t|", cZeichen); /* Ausgabe des Zeichens als Hexadezimal
*/
printf("\t%o\t|\n", cZeichen); /* Ausgabe des Zeichens als Oktalzah
*/
printf("\-----------------------------------------------------------------\n");



--
darcu
-----------------------------------------------------------------------
darcus's Profile: http://www.excelforum.com/member.php...fo&userid=3644
View this thread: http://www.excelforum.com/showthread.php?threadid=56211

 
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 11:36 PM.

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"