I have a set string that I use in a lot of message boxes:
Instead of having to cut and paste this over and over again, I'd like to set the value of 'strSkipLine' to equal those commands in a global module.
What would be the correct procedure for doing this? According to VBA help, you can't use a constant. Here's the text:
"You can't use variables, user-defined functions, or intrinsic Visual Basic functions (such as Chr) in expressions assigned to constants."
Would I just declare the string variable and set it equal to the string in a module outside any sub or function procedures? Like this:
Is that the correct way to do this such that all my code behind forms and such can use it?
Thanks in advance,
Onwards,
Q-
Code:
Chr$(13) & Chr$(13) & Chr$(10)
Instead of having to cut and paste this over and over again, I'd like to set the value of 'strSkipLine' to equal those commands in a global module.
What would be the correct procedure for doing this? According to VBA help, you can't use a constant. Here's the text:
"You can't use variables, user-defined functions, or intrinsic Visual Basic functions (such as Chr) in expressions assigned to constants."
Would I just declare the string variable and set it equal to the string in a module outside any sub or function procedures? Like this:
Code:
Dim strSkipLine as String
strSkipLine = Chr$(13) & Chr$(13) & Chr$(10)
Is that the correct way to do this such that all my code behind forms and such can use it?
Thanks in advance,
Onwards,
Q-