-
July 20th, 2009, 04:01 PM
#1
[REQUEST] What does #IF Means
Hello there.
I saw some codes that have the sharp characters in front of an IF, like:
x = true
#If x then
msgbox "omg, its true"
#End If
But i saw too that the msgbox never was displayed.
Someone can tell me what this sharp means?
-
July 20th, 2009, 04:49 PM
#2
Re: [REQUEST] What does #IF Means
It is a compiler directive
-
July 20th, 2009, 04:54 PM
#3
Re: [REQUEST] What does #IF Means
from an old class module that I have not looked at in years.
Code:
#If kilr Then
frmKILR.datKILR(Me.Index).Recordset.Delete
#Else
DesktopVBA.datVBA.Recordset.Delete
#End If
The class is used in 2 different programs one called kilr the other called desktopvba. If I am compiling the KILR program then the line in the first condition goes into the exe otherwise it uses the other line instead.
-
July 20th, 2009, 04:56 PM
#4
Re: [REQUEST] What does #IF Means
To get your code to show the message box you would need to go into your project properties then go to the Make tab and set the conditional compilation arguements to X=1 or X=True
In the case above there is a line written to the KILR project file that look slike this.
This is actually set using the properties dialog but gets written to the vbp file
Last edited by DataMiser; July 20th, 2009 at 04:59 PM.
-
July 20th, 2009, 04:58 PM
#5
Re: [REQUEST] What does #IF Means
Now i understood it. Thanks!
-
July 20th, 2009, 05:06 PM
#6
Re: [REQUEST] What does #IF Means
But still one question:
How do i declare two or more arguments?
I tried ",.|;" but no one worked.
EDIT:
Forget it. It's ":".
For those who wanna know more about: http://www.buygold.net/v03n11/v03n11.html
Last edited by Ash Katchup; July 20th, 2009 at 05:10 PM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|