Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 191
Default compile error

I have a spreadsheet program that I have been working on. I wanted to test
it on another computer so to see how it would work. When I run it on another
computer I get the following compile error:

Can't find project or library.

Here is the part of the procedure that it stops on

If TextBox2.Value = "" Then
CommandButton6.Enabled = False
Else
teststr = TextBox2.Text

For i = 1 To Len(teststr)
testchar = UCase(Mid(teststr, i, 1))
'MsgBox (TestChar)
If testchar = " " Then
CommandButton6.Enabled = True
Else
If Asc(testchar) < Asc("A") Or _
Asc(testchar) Asc("Z") Then
MsgBox "You need to enter Letters only for the Database
Name!", vbExclamation
CommandButton6.Enabled = False
TextBox2.Value = ""
Exit For
End If
CommandButton6.Enabled = True
End If
Next i
End If

It stops on 'Mid' on this part of this code

UCase(Mid(teststr, i, 1))

Any ideas on why it won't run this?
Thanks


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 389
Default compile error

Classic compilation problem with a MISSING reference. Uncheck the MISSING
reference in the VBE's Tools - References. If this is not a required
reference, uncheck it in the source / development copy too.

--
Tim Zych
www.higherdata.com
Compare data in Excel and find differences with Workbook Compare
A free, powerful, flexible Excel utility
Now with Table Compare for quick table comparisons


"ranswrt" wrote in message
...
I have a spreadsheet program that I have been working on. I wanted to test
it on another computer so to see how it would work. When I run it on
another
computer I get the following compile error:

Can't find project or library.

Here is the part of the procedure that it stops on

If TextBox2.Value = "" Then
CommandButton6.Enabled = False
Else
teststr = TextBox2.Text

For i = 1 To Len(teststr)
testchar = UCase(Mid(teststr, i, 1))
'MsgBox (TestChar)
If testchar = " " Then
CommandButton6.Enabled = True
Else
If Asc(testchar) < Asc("A") Or _
Asc(testchar) Asc("Z") Then
MsgBox "You need to enter Letters only for the Database
Name!", vbExclamation
CommandButton6.Enabled = False
TextBox2.Value = ""
Exit For
End If
CommandButton6.Enabled = True
End If
Next i
End If

It stops on 'Mid' on this part of this code

UCase(Mid(teststr, i, 1))

Any ideas on why it won't run this?
Thanks




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 191
Default compile error

I went to the Tools - References but I'm not sure which option to uncheck.
I'm also not sure what a required reference is. I'm new at this.

"Tim Zych" wrote:

Classic compilation problem with a MISSING reference. Uncheck the MISSING
reference in the VBE's Tools - References. If this is not a required
reference, uncheck it in the source / development copy too.

--
Tim Zych
www.higherdata.com
Compare data in Excel and find differences with Workbook Compare
A free, powerful, flexible Excel utility
Now with Table Compare for quick table comparisons


"ranswrt" wrote in message
...
I have a spreadsheet program that I have been working on. I wanted to test
it on another computer so to see how it would work. When I run it on
another
computer I get the following compile error:

Can't find project or library.

Here is the part of the procedure that it stops on

If TextBox2.Value = "" Then
CommandButton6.Enabled = False
Else
teststr = TextBox2.Text

For i = 1 To Len(teststr)
testchar = UCase(Mid(teststr, i, 1))
'MsgBox (TestChar)
If testchar = " " Then
CommandButton6.Enabled = True
Else
If Asc(testchar) < Asc("A") Or _
Asc(testchar) Asc("Z") Then
MsgBox "You need to enter Letters only for the Database
Name!", vbExclamation
CommandButton6.Enabled = False
TextBox2.Value = ""
Exit For
End If
CommandButton6.Enabled = True
End If
Next i
End If

It stops on 'Mid' on this part of this code

UCase(Mid(teststr, i, 1))

Any ideas on why it won't run this?
Thanks





  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 191
Default compile error

I bypassed the code where it was stopping at and got another compile error on
'lcase'.

I tried the same codes on another workbook on the same computer and they
worked fine on that workbook.

"Tim Zych" wrote:

Classic compilation problem with a MISSING reference. Uncheck the MISSING
reference in the VBE's Tools - References. If this is not a required
reference, uncheck it in the source / development copy too.

--
Tim Zych
www.higherdata.com
Compare data in Excel and find differences with Workbook Compare
A free, powerful, flexible Excel utility
Now with Table Compare for quick table comparisons


"ranswrt" wrote in message
...
I have a spreadsheet program that I have been working on. I wanted to test
it on another computer so to see how it would work. When I run it on
another
computer I get the following compile error:

Can't find project or library.

Here is the part of the procedure that it stops on

If TextBox2.Value = "" Then
CommandButton6.Enabled = False
Else
teststr = TextBox2.Text

For i = 1 To Len(teststr)
testchar = UCase(Mid(teststr, i, 1))
'MsgBox (TestChar)
If testchar = " " Then
CommandButton6.Enabled = True
Else
If Asc(testchar) < Asc("A") Or _
Asc(testchar) Asc("Z") Then
MsgBox "You need to enter Letters only for the Database
Name!", vbExclamation
CommandButton6.Enabled = False
TextBox2.Value = ""
Exit For
End If
CommandButton6.Enabled = True
End If
Next i
End If

It stops on 'Mid' on this part of this code

UCase(Mid(teststr, i, 1))

Any ideas on why it won't run this?
Thanks





  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 389
Default compile error

In the problem machine, are there any MISSING references?

--
Tim Zych
www.higherdata.com
Compare data in Excel and find differences with Workbook Compare
A free, powerful, flexible Excel utility
Now with Table Compare for quick table comparisons


"ranswrt" wrote in message
...
I went to the Tools - References but I'm not sure which option to uncheck.
I'm also not sure what a required reference is. I'm new at this.

"Tim Zych" wrote:

Classic compilation problem with a MISSING reference. Uncheck the MISSING
reference in the VBE's Tools - References. If this is not a required
reference, uncheck it in the source / development copy too.

--
Tim Zych
www.higherdata.com
Compare data in Excel and find differences with Workbook Compare
A free, powerful, flexible Excel utility
Now with Table Compare for quick table comparisons


"ranswrt" wrote in message
...
I have a spreadsheet program that I have been working on. I wanted to
test
it on another computer so to see how it would work. When I run it on
another
computer I get the following compile error:

Can't find project or library.

Here is the part of the procedure that it stops on

If TextBox2.Value = "" Then
CommandButton6.Enabled = False
Else
teststr = TextBox2.Text

For i = 1 To Len(teststr)
testchar = UCase(Mid(teststr, i, 1))
'MsgBox (TestChar)
If testchar = " " Then
CommandButton6.Enabled = True
Else
If Asc(testchar) < Asc("A") Or _
Asc(testchar) Asc("Z") Then
MsgBox "You need to enter Letters only for the Database
Name!", vbExclamation
CommandButton6.Enabled = False
TextBox2.Value = ""
Exit For
End If
CommandButton6.Enabled = True
End If
Next i
End If

It stops on 'Mid' on this part of this code

UCase(Mid(teststr, i, 1))

Any ideas on why it won't run this?
Thanks









  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 191
Default compile error

I found the MISSING Ref Edit Control and unchecked it on the computer I was
having the problems with. If I understand it correctly I should uncheck Ref
Edit Control on the source computer also. How do I know if this is needed on
the source computer?

"Tim Zych" wrote:

Classic compilation problem with a MISSING reference. Uncheck the MISSING
reference in the VBE's Tools - References. If this is not a required
reference, uncheck it in the source / development copy too.

--
Tim Zych
www.higherdata.com
Compare data in Excel and find differences with Workbook Compare
A free, powerful, flexible Excel utility
Now with Table Compare for quick table comparisons


"ranswrt" wrote in message
...
I have a spreadsheet program that I have been working on. I wanted to test
it on another computer so to see how it would work. When I run it on
another
computer I get the following compile error:

Can't find project or library.

Here is the part of the procedure that it stops on

If TextBox2.Value = "" Then
CommandButton6.Enabled = False
Else
teststr = TextBox2.Text

For i = 1 To Len(teststr)
testchar = UCase(Mid(teststr, i, 1))
'MsgBox (TestChar)
If testchar = " " Then
CommandButton6.Enabled = True
Else
If Asc(testchar) < Asc("A") Or _
Asc(testchar) Asc("Z") Then
MsgBox "You need to enter Letters only for the Database
Name!", vbExclamation
CommandButton6.Enabled = False
TextBox2.Value = ""
Exit For
End If
CommandButton6.Enabled = True
End If
Next i
End If

It stops on 'Mid' on this part of this code

UCase(Mid(teststr, i, 1))

Any ideas on why it won't run this?
Thanks





  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 389
Default compile error

Hm, I am not aware Ref Edit Control (refedit.dll) is even required to use
it.

As long as you're not using the RefEdit control uncheck it in the source and
you should be good to go.

--
Tim Zych
www.higherdata.com
Compare data in Excel and find differences with Workbook Compare
A free, powerful, flexible Excel utility
Now with Table Compare for quick table comparisons


"ranswrt" wrote in message
...
I found the MISSING Ref Edit Control and unchecked it on the computer I was
having the problems with. If I understand it correctly I should uncheck
Ref
Edit Control on the source computer also. How do I know if this is needed
on
the source computer?

"Tim Zych" wrote:

Classic compilation problem with a MISSING reference. Uncheck the MISSING
reference in the VBE's Tools - References. If this is not a required
reference, uncheck it in the source / development copy too.

--
Tim Zych
www.higherdata.com
Compare data in Excel and find differences with Workbook Compare
A free, powerful, flexible Excel utility
Now with Table Compare for quick table comparisons


"ranswrt" wrote in message
...
I have a spreadsheet program that I have been working on. I wanted to
test
it on another computer so to see how it would work. When I run it on
another
computer I get the following compile error:

Can't find project or library.

Here is the part of the procedure that it stops on

If TextBox2.Value = "" Then
CommandButton6.Enabled = False
Else
teststr = TextBox2.Text

For i = 1 To Len(teststr)
testchar = UCase(Mid(teststr, i, 1))
'MsgBox (TestChar)
If testchar = " " Then
CommandButton6.Enabled = True
Else
If Asc(testchar) < Asc("A") Or _
Asc(testchar) Asc("Z") Then
MsgBox "You need to enter Letters only for the Database
Name!", vbExclamation
CommandButton6.Enabled = False
TextBox2.Value = ""
Exit For
End If
CommandButton6.Enabled = True
End If
Next i
End If

It stops on 'Mid' on this part of this code

UCase(Mid(teststr, i, 1))

Any ideas on why it won't run this?
Thanks







  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 191
Default compile error

Yes, Missing Ref Edit Control. I unchecked it and the program worked. If I
understand you correctly I should uncheck Ref Edit Control on the source
computer also. What is it and how do I know if is needed?

"Tim Zych" wrote:

In the problem machine, are there any MISSING references?

--
Tim Zych
www.higherdata.com
Compare data in Excel and find differences with Workbook Compare
A free, powerful, flexible Excel utility
Now with Table Compare for quick table comparisons


"ranswrt" wrote in message
...
I went to the Tools - References but I'm not sure which option to uncheck.
I'm also not sure what a required reference is. I'm new at this.

"Tim Zych" wrote:

Classic compilation problem with a MISSING reference. Uncheck the MISSING
reference in the VBE's Tools - References. If this is not a required
reference, uncheck it in the source / development copy too.

--
Tim Zych
www.higherdata.com
Compare data in Excel and find differences with Workbook Compare
A free, powerful, flexible Excel utility
Now with Table Compare for quick table comparisons


"ranswrt" wrote in message
...
I have a spreadsheet program that I have been working on. I wanted to
test
it on another computer so to see how it would work. When I run it on
another
computer I get the following compile error:

Can't find project or library.

Here is the part of the procedure that it stops on

If TextBox2.Value = "" Then
CommandButton6.Enabled = False
Else
teststr = TextBox2.Text

For i = 1 To Len(teststr)
testchar = UCase(Mid(teststr, i, 1))
'MsgBox (TestChar)
If testchar = " " Then
CommandButton6.Enabled = True
Else
If Asc(testchar) < Asc("A") Or _
Asc(testchar) Asc("Z") Then
MsgBox "You need to enter Letters only for the Database
Name!", vbExclamation
CommandButton6.Enabled = False
TextBox2.Value = ""
Exit For
End If
CommandButton6.Enabled = True
End If
Next i
End If

It stops on 'Mid' on this part of this code

UCase(Mid(teststr, i, 1))

Any ideas on why it won't run this?
Thanks








  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 191
Default compile error

Thanks for your help

"Tim Zych" wrote:

Hm, I am not aware Ref Edit Control (refedit.dll) is even required to use
it.

As long as you're not using the RefEdit control uncheck it in the source and
you should be good to go.

--
Tim Zych
www.higherdata.com
Compare data in Excel and find differences with Workbook Compare
A free, powerful, flexible Excel utility
Now with Table Compare for quick table comparisons


"ranswrt" wrote in message
...
I found the MISSING Ref Edit Control and unchecked it on the computer I was
having the problems with. If I understand it correctly I should uncheck
Ref
Edit Control on the source computer also. How do I know if this is needed
on
the source computer?

"Tim Zych" wrote:

Classic compilation problem with a MISSING reference. Uncheck the MISSING
reference in the VBE's Tools - References. If this is not a required
reference, uncheck it in the source / development copy too.

--
Tim Zych
www.higherdata.com
Compare data in Excel and find differences with Workbook Compare
A free, powerful, flexible Excel utility
Now with Table Compare for quick table comparisons


"ranswrt" wrote in message
...
I have a spreadsheet program that I have been working on. I wanted to
test
it on another computer so to see how it would work. When I run it on
another
computer I get the following compile error:

Can't find project or library.

Here is the part of the procedure that it stops on

If TextBox2.Value = "" Then
CommandButton6.Enabled = False
Else
teststr = TextBox2.Text

For i = 1 To Len(teststr)
testchar = UCase(Mid(teststr, i, 1))
'MsgBox (TestChar)
If testchar = " " Then
CommandButton6.Enabled = True
Else
If Asc(testchar) < Asc("A") Or _
Asc(testchar) Asc("Z") Then
MsgBox "You need to enter Letters only for the Database
Name!", vbExclamation
CommandButton6.Enabled = False
TextBox2.Value = ""
Exit For
End If
CommandButton6.Enabled = True
End If
Next i
End If

It stops on 'Mid' on this part of this code

UCase(Mid(teststr, i, 1))

Any ideas on why it won't run this?
Thanks








  #10   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 389
Default compile error

See what a refedit control looks like by going to my website.

At the top is a screenshot of "Table Compare" which uses RefEdit controls.
They allow you to select ranges on a workhseet.

Sounds like the reference got "checked" somehow in your project but that you
are not using it.


--
Tim Zych
www.higherdata.com
Compare data in Excel and find differences with Workbook Compare
A free, powerful, flexible Excel utility
Now with Table Compare for quick table comparisons


"ranswrt" wrote in message
...
Yes, Missing Ref Edit Control. I unchecked it and the program worked. If
I
understand you correctly I should uncheck Ref Edit Control on the source
computer also. What is it and how do I know if is needed?

"Tim Zych" wrote:

In the problem machine, are there any MISSING references?

--
Tim Zych
www.higherdata.com
Compare data in Excel and find differences with Workbook Compare
A free, powerful, flexible Excel utility
Now with Table Compare for quick table comparisons


"ranswrt" wrote in message
...
I went to the Tools - References but I'm not sure which option to
uncheck.
I'm also not sure what a required reference is. I'm new at this.

"Tim Zych" wrote:

Classic compilation problem with a MISSING reference. Uncheck the
MISSING
reference in the VBE's Tools - References. If this is not a required
reference, uncheck it in the source / development copy too.

--
Tim Zych
www.higherdata.com
Compare data in Excel and find differences with Workbook Compare
A free, powerful, flexible Excel utility
Now with Table Compare for quick table comparisons


"ranswrt" wrote in message
...
I have a spreadsheet program that I have been working on. I wanted
to
test
it on another computer so to see how it would work. When I run it on
another
computer I get the following compile error:

Can't find project or library.

Here is the part of the procedure that it stops on

If TextBox2.Value = "" Then
CommandButton6.Enabled = False
Else
teststr = TextBox2.Text

For i = 1 To Len(teststr)
testchar = UCase(Mid(teststr, i, 1))
'MsgBox (TestChar)
If testchar = " " Then
CommandButton6.Enabled = True
Else
If Asc(testchar) < Asc("A") Or _
Asc(testchar) Asc("Z") Then
MsgBox "You need to enter Letters only for the
Database
Name!", vbExclamation
CommandButton6.Enabled = False
TextBox2.Value = ""
Exit For
End If
CommandButton6.Enabled = True
End If
Next i
End If

It stops on 'Mid' on this part of this code

UCase(Mid(teststr, i, 1))

Any ideas on why it won't run this?
Thanks










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
help with this error-Compile error: cant find project or library JackR Excel Discussion (Misc queries) 2 June 10th 06 09:09 PM
VBAProject name compile error, not defined at compile time Matthew Dodds Excel Programming 1 December 13th 05 07:17 PM
error message: compile error, argument not optional Pierre via OfficeKB.com Excel Programming 3 September 5th 05 03:45 PM
How do I get rid of "Compile error in hidden module" error message David Excel Discussion (Misc queries) 4 January 21st 05 11:39 PM


All times are GMT +1. The time now is 11:33 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"