Macro __FILE__ also in VB? 
Author Message
 Macro __FILE__ also in VB?

Please help,
I'm looking for an equivalent for the ansi C macros __FILE__ and
__LINE__ . I wonder IF there is a solution for this, because vb doesn't
have a preprocessor facility.

Thanks anyway,

CK Lam



Sat, 16 Dec 2000 03:00:00 GMT  
 Macro __FILE__ also in VB?

Quote:

> Please help,
> I'm looking for an equivalent for the ansi C macros __FILE__ and
> __LINE__ . I wonder IF there is a solution for this, because vb doesn't
> have a preprocessor facility.

> Thanks anyway,

> CK Lam

I haven't used them, but in VB5 help, one finds:
(Try searching for "#else". Obviously, "#if" would be too easy ;)

#if.. Then.. #else Directive

Conditionally compiles selected blocks of Visual Basic code.

Syntax

#If expression Then
        statements
[#ElseIf expression-n Then
        [elseifstatements]]
[#Else
        [elsestatements]]
#End If

The #If...Then...#Else directive syntax has these parts:



Sat, 16 Dec 2000 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. First attempt at a VB Macro (Getting a File)

2. VB macro disappears when .doc file is launched inside Internet Explorer window

3. VB macro to print file daily

4. VB.net equivalent to C++ macros __FILE__ and ___LINE__

5. use VB macro in word to cause file to upload to a web URL

6. Need help with VB macro to print Word file

7. VB macro / ODBC log file too large

8. VB word macro file selection

9. VB, convert txt file to excel spreadsheet, w macro formatting

10. Help! Converting Macro to VB EXE File

11. VB macro / ODBC log file too large

12. Bugger...How can l use VB macro to rename a file

 

 
Powered by phpBB® Forum Software