View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson[_3_] Dave Peterson[_3_] is offline
external usenet poster
 
Posts: 2,824
Default Not recognizing a Const

And you could even just use:
vbTab
it's a constant builtin to VBA.

Const DELIMITER As String = vbTab

(And if delimiter isn't going to change in future versions, vbtab is quicker to
type!)

Dan T wrote:

I'm writing a routine to write to a test file. I've had two suggestions;
delimiter=Char(9). This gives me an invalid function all. And;
Const DELIMITER As String = CHR(9), this gives me an error of "Const expression required"
It does not seem to be accepting the chr(9) or the char(9) as a valid literal to set the delimiter to.
Any ideas why?


--

Dave Peterson