#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 47
Default Why?

I am in the VB Editor and have typed the name of a new
routine call Summonth()

When I key in "Summonth()" and then press enter, Visual
Basic keeps putting up the box "Compile
Error", "Expected:="

But I haven't keyed anything yet for it to object to on
that routine, so why is it making the red area the new
routine and highlighting that in Red letters? I haven't
done anything with it yet. Does it really have a problem
with something in the previous routine?

Exasperated,


Bruce


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 26
Default Why?

Did you put Sub in front of it?

Sub Summonth()

"Bruce Roberson" wrote in message
...
I am in the VB Editor and have typed the name of a new
routine call Summonth()

When I key in "Summonth()" and then press enter, Visual
Basic keeps putting up the box "Compile
Error", "Expected:="

But I haven't keyed anything yet for it to object to on
that routine, so why is it making the red area the new
routine and highlighting that in Red letters? I haven't
done anything with it yet. Does it really have a problem
with something in the previous routine?

Exasperated,


Bruce




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 620
Default Why?

Bruce,

Did you precede it with Sub or Function?

--

HTH

Bob Phillips

"Bruce Roberson" wrote in message
...
I am in the VB Editor and have typed the name of a new
routine call Summonth()

When I key in "Summonth()" and then press enter, Visual
Basic keeps putting up the box "Compile
Error", "Expected:="

But I haven't keyed anything yet for it to object to on
that routine, so why is it making the red area the new
routine and highlighting that in Red letters? I haven't
done anything with it yet. Does it really have a problem
with something in the previous routine?

Exasperated,


Bruce




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Why?

did you put in

Public Sub Summonth()

or

Sub Summonth()

or

Function Summonth()

or

Public Function Summonth()

(possibly replacing Public with Private)

--
Regards,
Tom Ogilvy


"Bruce Roberson" wrote in message
...
I am in the VB Editor and have typed the name of a new
routine call Summonth()

When I key in "Summonth()" and then press enter, Visual
Basic keeps putting up the box "Compile
Error", "Expected:="

But I haven't keyed anything yet for it to object to on
that routine, so why is it making the red area the new
routine and highlighting that in Red letters? I haven't
done anything with it yet. Does it realliy have a problem
with something in the previous routine?

Exasperated,


Bruce




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 47
Default Why?

I just lost my mind for a minute I guess and forgot to put
the word "sub" before the name... I guess I'm so bogged
down in logic right now trying to figure out my project,
that I made a goofy mistake that I shouldn't be making at
this point.

Thanks,


Bruce
-----Original Message-----
did you put in

Public Sub Summonth()

or

Sub Summonth()

or

Function Summonth()

or

Public Function Summonth()

(possibly replacing Public with Private)

--
Regards,
Tom Ogilvy


"Bruce Roberson" wrote in

message
...
I am in the VB Editor and have typed the name of a new
routine call Summonth()

When I key in "Summonth()" and then press enter, Visual
Basic keeps putting up the box "Compile
Error", "Expected:="

But I haven't keyed anything yet for it to object to on
that routine, so why is it making the red area the new
routine and highlighting that in Red letters? I haven't
done anything with it yet. Does it realliy have a

problem
with something in the previous routine?

Exasperated,


Bruce




.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 06:12 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"