Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 247
Default Compile Error: Expected Variable or Procedure, Not Project

Have used / tested the following numerous times over the past few months.
Not that I'm almost ready to send out my "package", I tried one last test.
The first time it worked great. The 2nd time, I get the compile error
message, as shown above.
I copied over the "master/back-up" and tried again, with the same error
result.
Can someone direct me as to what is happening, and how I can correct this?

Private Sub Workbook_Open()
QCNum_Updater
End Sub

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,939
Default Compile Error: Expected Variable or Procedure, Not Project

What exactly is QCNum_Updater. I am assuming it is a procedure of some sort?
I assume that it exists somewhere in your project. If you right click on it
and select Definition it takes you to the procedure? Do your modules include
"option explicit" at the top?
--
HTH...

Jim Thomlinson


"BEEJAY" wrote:

Have used / tested the following numerous times over the past few months.
Not that I'm almost ready to send out my "package", I tried one last test.
The first time it worked great. The 2nd time, I get the compile error
message, as shown above.
I copied over the "master/back-up" and tried again, with the same error
result.
Can someone direct me as to what is happening, and how I can correct this?

Private Sub Workbook_Open()
QCNum_Updater
End Sub

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 247
Default Compile Error: Expected Variable or Procedure, Not Project

QCNum_Updater is a macro in Module 1, that calls other subs and messages from
Modules 2 and 3.
All my modules are set up with "Option Explicit". I've read that it is a
good thing to do.
Yes, when I right click on QCNum_Updater, I get taken directly to the
procedure in Module # 1.



"Jim Thomlinson" wrote:

What exactly is QCNum_Updater. I am assuming it is a procedure of some sort?
I assume that it exists somewhere in your project. If you right click on it
and select Definition it takes you to the procedure? Do your modules include
"option explicit" at the top?
--
HTH...

Jim Thomlinson


"BEEJAY" wrote:

Have used / tested the following numerous times over the past few months.
Not that I'm almost ready to send out my "package", I tried one last test.
The first time it worked great. The 2nd time, I get the compile error
message, as shown above.
I copied over the "master/back-up" and tried again, with the same error
result.
Can someone direct me as to what is happening, and how I can correct this?

Private Sub Workbook_Open()
QCNum_Updater
End Sub

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Compile Error: Expected Variable or Procedure, Not Project

What's the name of the VBAProject for this workbook?

Did you use that same name for any of the module names?

It's not a good idea to reuse these names.

BEEJAY wrote:

Have used / tested the following numerous times over the past few months.
Not that I'm almost ready to send out my "package", I tried one last test.
The first time it worked great. The 2nd time, I get the compile error
message, as shown above.
I copied over the "master/back-up" and tried again, with the same error
result.
Can someone direct me as to what is happening, and how I can correct this?

Private Sub Workbook_Open()
QCNum_Updater
End Sub


--

Dave Peterson
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,939
Default Compile Error: Expected Variable or Procedure, Not Project

There is nothing in there that should be causing a compile error. Have you
checked for missing references. That is a bit of a long shot but sometimes
that will cause a compile error on an otherwise good line of code...
--
HTH...

Jim Thomlinson


"BEEJAY" wrote:

QCNum_Updater is a macro in Module 1, that calls other subs and messages from
Modules 2 and 3.
All my modules are set up with "Option Explicit". I've read that it is a
good thing to do.
Yes, when I right click on QCNum_Updater, I get taken directly to the
procedure in Module # 1.



"Jim Thomlinson" wrote:

What exactly is QCNum_Updater. I am assuming it is a procedure of some sort?
I assume that it exists somewhere in your project. If you right click on it
and select Definition it takes you to the procedure? Do your modules include
"option explicit" at the top?
--
HTH...

Jim Thomlinson


"BEEJAY" wrote:

Have used / tested the following numerous times over the past few months.
Not that I'm almost ready to send out my "package", I tried one last test.
The first time it worked great. The 2nd time, I get the compile error
message, as shown above.
I copied over the "master/back-up" and tried again, with the same error
result.
Can someone direct me as to what is happening, and how I can correct this?

Private Sub Workbook_Open()
QCNum_Updater
End Sub



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 247
Default Compile Error: Expected Variable or Procedure, Not Project

The actual file name is QCNUM_Updater.xls
The subs name is QCNUM_Updater
I have now changed the file name to QCNUMBER Updating.xls
I check it out in the morning, and see if that helps out with this
intermitent problem.
Thanks for now.


"Dave Peterson" wrote:

What's the name of the VBAProject for this workbook?

Did you use that same name for any of the module names?

It's not a good idea to reuse these names.

BEEJAY wrote:

Have used / tested the following numerous times over the past few months.
Not that I'm almost ready to send out my "package", I tried one last test.
The first time it worked great. The 2nd time, I get the compile error
message, as shown above.
I copied over the "master/back-up" and tried again, with the same error
result.
Can someone direct me as to what is happening, and how I can correct this?

Private Sub Workbook_Open()
QCNum_Updater
End Sub


--

Dave Peterson

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Compile Error: Expected Variable or Procedure, Not Project

If that doesn't work, make sure you look at the Project's name, too.

Open the VBE
select your project
Do you see:
QCNUM_Updater(QCNUM_Updater.xls)

if yes, then hit F4 (to see the properties window)
then give that project a new (name)



BEEJAY wrote:

The actual file name is QCNUM_Updater.xls
The subs name is QCNUM_Updater
I have now changed the file name to QCNUMBER Updating.xls
I check it out in the morning, and see if that helps out with this
intermitent problem.
Thanks for now.

"Dave Peterson" wrote:

What's the name of the VBAProject for this workbook?

Did you use that same name for any of the module names?

It's not a good idea to reuse these names.

BEEJAY wrote:

Have used / tested the following numerous times over the past few months.
Not that I'm almost ready to send out my "package", I tried one last test.
The first time it worked great. The 2nd time, I get the compile error
message, as shown above.
I copied over the "master/back-up" and tried again, with the same error
result.
Can someone direct me as to what is happening, and how I can correct this?

Private Sub Workbook_Open()
QCNum_Updater
End Sub


--

Dave Peterson


--

Dave Peterson
  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 247
Default Compile Error: Expected Variable or Procedure, Not Project

Sorry about the delay of response.
Yes, the naming of modules etc. was the problem.
Your help greatly appreciated, as always.


"Dave Peterson" wrote:

If that doesn't work, make sure you look at the Project's name, too.

Open the VBE
select your project
Do you see:
QCNUM_Updater(QCNUM_Updater.xls)

if yes, then hit F4 (to see the properties window)
then give that project a new (name)



BEEJAY wrote:

The actual file name is QCNUM_Updater.xls
The subs name is QCNUM_Updater
I have now changed the file name to QCNUMBER Updating.xls
I check it out in the morning, and see if that helps out with this
intermitent problem.
Thanks for now.

"Dave Peterson" wrote:

What's the name of the VBAProject for this workbook?

Did you use that same name for any of the module names?

It's not a good idea to reuse these names.

BEEJAY wrote:

Have used / tested the following numerous times over the past few months.
Not that I'm almost ready to send out my "package", I tried one last test.
The first time it worked great. The 2nd time, I get the compile error
message, as shown above.
I copied over the "master/back-up" and tried again, with the same error
result.
Can someone direct me as to what is happening, and how I can correct this?

Private Sub Workbook_Open()
QCNum_Updater
End Sub

--

Dave Peterson


--

Dave Peterson

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Micrsoft Visual Basic Compile error: Expected: end of statement IJ Excel Discussion (Misc queries) 5 October 23rd 06 12:08 AM
compile error: Expected: = ...Why? cesw[_2_] Excel Programming 3 September 10th 05 12:41 AM
Compile error: Procedure too large BHARATH RAJAMANI Excel Programming 2 August 24th 05 10:24 PM
Compile Error: Expected End Property George J[_3_] Excel Programming 4 August 3rd 05 03:35 PM
compile error: expected variable or function MMM Excel Discussion (Misc queries) 3 December 24th 04 03:11 PM


All times are GMT +1. The time now is 05:28 AM.

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"