![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: Apr 2002
Location: JimJ
Posts: 4
|
When I run this subroutine:
Sub test_macro() String1 = "Hello World" String2 = Right(String1, 3) End I get this compile error message: "Can't find project or library" It shows the line: String2 = Right(String1, 3) with "Right" in bold. I know this is something very simple but I'm unable to figure it out. |
|
|
|
|
|
#2 | |
|
Board Regular
Join Date: Mar 2002
Posts: 1,805
|
Quote:
End with 'End Sub' Eli [ This Message was edited by: eliW on 2002-04-03 14:36 ] |
|
|
|
|
|
|
#3 |
|
Banned
Join Date: Feb 2002
Posts: 1,582
|
Hi excel_lint
While in the VBE go to Tools>Refrences the missing reference will be preceded with the word "Missing" use the browse button to locate and load it. |
|
|
|
|
|
#4 | |
|
New Member
Join Date: Apr 2002
Location: JimJ
Posts: 4
|
Thanks, I opened a new worksheet and it worked fine. Don't know why it won't work in the orginal but this solution will get me going.
-------------- On 2002-04-03 14:35, eliW wrote: Quote:
End with 'End Sub' Eli [ This Message was edited by: eliW on 2002-04-03 14:36 ] [/quote] |
|
|
|
|
|
|
#5 |
|
Board Regular
Join Date: Mar 2002
Location: Cincinnati, Ohio, USA
Posts: 6,824
|
If you do not see a missing reference, change your code as follows:
String2 = Right(String1, 3) String2 = Strings.Right(String1, 3) That should solve your problem Tom |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|