View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default what's diferent in vba between 2002 & 2003

UCase didn't change.

On the offending pc, open that workbook, go to the VBE, select your project.

Then look under Tools|References
Look for MISSING

Remove that reference (or replace it with one that exists)

lasso wrote:

if I run this macro under excel 2002, Microsoft visual basic shows the
message: Can't find project or library.
the error line is in "Private Sub Work_Open()" at "UCase"

P.S this macro is fine under excel 2003.

I gusee it maybe cause by different VBA location between 2003 & 2002 .

"Dave Patrick" wrote:

The actual line and the error generated would also be a big help.

--

Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect

"lasso" wrote:
| Hi Dave,
| thanks your reply.
|
| I paste the code here.
|
| Private Sub Workbook_Activate()
|
| Call CreateMenu
|
| End Sub
|
| Private Sub Workbook_BeforeClose(Cancel As Boolean)
|
| Call DeleteMenu
|
| End Sub
|
| Private Sub Workbook_Deactivate()
|
| Call DeleteMenu
|
| End Sub
|
| Private Sub Workbook_Open()
|
| Dim R As Integer
| Dim AU As String
|
| On Error GoTo Nothing_Happen
|
| Application.CommandBars("Reviewing").Visible = False
|
| AU = Replace(Trim(UCase(Application.UserName)), " ", "")
| R = ActiveSheet.UsedRange.Rows.Count
|
| Sheets("To_Be_Arrange").Select
|
| For I = 1 To R
| If Replace(Trim(UCase(Cells(I, 11))), " ", "") = AU Then
| Selection.AutoFilter Field:=11, Criteria1:=Cells(I, 11)
| Range("A1:N" & CStr(R)).Sort Key1:=Range("L2"),
| Order1:=xlAscending, Key2:=Range _
| ("D2"), Order2:=xlAscending, Key3:=Range("A2"),
| Order3:=xlAscending, _
| Header:=xlGuess, OrderCustom:=1, MatchCase:=False,
Orientation:= _
| xlTopToBottom, DataOption1:=xlSortNormal,
| DataOption2:=xlSortNormal, _
| DataOption3:=xlSortNormal
| Range("A1").Select
| End
| Else
| End If
| Next I
|
| Nothing_Happen:
|
| If Cells(1, 1) < "" Then
| Selection.AutoFilter Field:=11
| Range("A1").Select
| Else
| End
| End If
|
| End Sub




--

Dave Peterson