Wierd VBA happenings...
A general rule of thumb is that each module can contain a maximum of about 64k
characters. If you copy and paste into Notepad and save that file as *.txt, you
can look at the size in windows explorer.
But are you sure you don't have an End Sub or End Function right before this
problem line?
Remember to scroll all the way to the right to check.
LT wrote:
Hello all.
I was wondering if by chance there is a limit to how much code you can
type into a vba Excel document. Is there a limit on how much code can
go into one button or an entire userform?
I ask this cause I get this error message;
"Compile Error:
Only comments may appear after End Sub, End Function or End Property"
When it jumps me to see what's "wrong" it goes to highlight this line
of code that is in the middle of a bunch of code.
txtApt.Locked = True
Which, to my knowledge has nothing to do with why the errors that are
being generated.
I'm hoping one of you out there might have some knowledge to share on
any quirks with Excel and VBA.
Thanks in advance.
-LT
--
Dave Peterson
|