View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Chip Pearson Chip Pearson is offline
external usenet poster
 
Posts: 7,247
Default Does VB have SYMBOLIC CONSTANTS similar to C/C++

Ken,

No, VBA doesn't have what you are looking for. You can, however,
use Property Get procedures in your module. E.g.,

Property Get AAA() As Range
Set AAA = Range("A1")
End Property



Sub BBB()
AAA.Value = 123
End Sub



--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"Ken Soenen" wrote in message
...
Is there anything in Visual Basic that is similar to SYMBOLIC
CONSTANTS as used in the C Language. For Example, in C:

#define AAA sheet4.cells(35,6)

Sub SomeSub()

AAA = "xyz"

end sub

The compiler encounters the "#define" directive and thereafter
replaces all occurrences of "AAA" with "sheet4.cells(35,6)". So
it then ends up compiling the statement:

sheet4.cells(35,6) = "xyz"

thanks,

ken