|
-
Mar 19th, 2000, 06:43 PM
#1
Thread Starter
Hyperactive Member
Is this possible?
I have a line
Public temp_new_CmbTitle As String
and what i`d like is something like
Public temp_new_CmbTitle As String = "0"
is this possible?
a.
-
Mar 19th, 2000, 06:48 PM
#2
Frenzied Member
In a word NO!
This was one of my gripes when I first started with VB
The best you can do is:
Public temp_new_CmbTitle As String: temp_new_CmbTitle = "0"
-
Mar 19th, 2000, 06:54 PM
#3
transcendental analytic
Const temp_new_CmbTitle As String ="0"
I almost know that this isn't what you are looking for. Because you cant change any constants. But this is that one line thing you were asking for....
-
Mar 19th, 2000, 08:53 PM
#4
Thread Starter
Hyperactive Member
Er, yeah, a const is no good in this case. (Cos i need to have a default value, as i`m comparing against data from a db, and i get an error if i compare a zero with a null).
I`m glad its not just me it annoyed. I cant think of a reason that this was done as a design decision. Maybe to force you to use consts instead of vars? But i cant have them as consts, can I ?!
While i`m moaning, does anyone else (reading this thread, not worth starting a new one) get this bug where one of the forms (in the project explorer window) gets highlighted when you select it, and for the rest of your session it remains highlighted - you can still select other forms to edit with right-mouse/view code, but the highlight moves back to the originally highlighted form?
Thanks anyway!
Alex.
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
|