ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Compatibility issue? (https://www.excelbanter.com/excel-programming/401985-compatibility-issue.html)

tom

Compatibility issue?
 
I have been slowly developing this spreadsheet for quite some time now and
have been given a dealine now for completion. I decided to take it home to
work on it...I open it up and it seems that the majority of the macros won't
run on it at home! Why is it that a spreadsheet that I have at work has no
issues at all with it running the macros while at home it is riddled with vb
errors?
- Both versions of Excel are the same...2002 SP3
- I ENSURED that the same libraries are installed on my version at home.

Where else can I look to find what the issue may be? Upon completion of this
spreadsheet, it will be distributed across the country...I am now extremely
worried that it won't run properly on all those other computers!!!

Any suggestions/ideas that may save me some gray hairs???

Arlette[_2_]

Compatibility issue?
 
Are the macros on the same spreadsheet or in a different workbook?
What about the file names that are invoked in the macro - are they the
same? You need to ensure that if you open certain files or save them
in a particular folder - the folder structure / file names need to be
the same...

Nigel[_2_]

Compatibility issue?
 
These normally arise when different version of Excel are involved. But as
you say you are suing the same version in both places!

Are there any VB project references missing? Goto the VB editor 'Tools' -
'References' and see if there are any missing.

If that is OK, you say "riddled with vb errors"; what type of errors are
you getting?



--

Regards,
Nigel




"Tom" wrote in message
...
I have been slowly developing this spreadsheet for quite some time now and
have been given a dealine now for completion. I decided to take it home to
work on it...I open it up and it seems that the majority of the macros
won't
run on it at home! Why is it that a spreadsheet that I have at work has no
issues at all with it running the macros while at home it is riddled with
vb
errors?
- Both versions of Excel are the same...2002 SP3
- I ENSURED that the same libraries are installed on my version at home.

Where else can I look to find what the issue may be? Upon completion of
this
spreadsheet, it will be distributed across the country...I am now
extremely
worried that it won't run properly on all those other computers!!!

Any suggestions/ideas that may save me some gray hairs???



tom

Compatibility issue?
 
Nigel,
These are what I have both at home and at work as far as references go:
Visual Basic For Applications
Microsoft Excel 10.0 Object Library
OLE Automation
Microsoft Office 10.0 Object Library
Microsoft Outlook 11.0 Object Library
Microsoft Forms 2.0 Object Library

As I said, that was the FIRST thing that I looked at.
Arlette...there are no other files associated with this spreadsheet and it
does not reference any other files/drives/paths etc.
As far as all the errors go...Upon opening up the workbook I started getting
errors. First one was on a custom function that I am using. error: FUNCTION
NOT DEFINED
After disabling that macro...several other errors came up that I didn't
write down the exact error names...frustration had set in at that point! I DO
recall that the second macro that had an error was as follows:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim sh As Worksheet, sh1 As Worksheet
Dim rng As Range, Cell As Range
Dim bVisible As Boolean
Set rng = Worksheets("Main").Range("C8:C17")
If Not Intersect(Target, rng) Is Nothing Then
For Each sh1 In Worksheets
bVisible = False
If LCase(sh1.Name) < "main" Then <----ERROR OCCURED HERE
For Each Cell In rng
Set sh = Nothing
On Error Resume Next
Set sh = Worksheets(Cell.Value)
On Error GoTo 0
If Not sh Is Nothing Then
If sh.Name = sh1.Name Then
bVisible = True
Exit For
End If
End If
Next Cell
If bVisible Then
sh1.Visible = xlSheetVisible
Else
sh1.Visible = xlSheetHidden
End If
End If
Next sh1
End If
End Sub
After getting past this one....there was just error after error after
error...............

Thanks for taking the time to consider my issue here!

"Nigel" wrote:

These normally arise when different version of Excel are involved. But as
you say you are suing the same version in both places!

Are there any VB project references missing? Goto the VB editor 'Tools' -
'References' and see if there are any missing.

If that is OK, you say "riddled with vb errors"; what type of errors are
you getting?



--

Regards,
Nigel




"Tom" wrote in message
...
I have been slowly developing this spreadsheet for quite some time now and
have been given a dealine now for completion. I decided to take it home to
work on it...I open it up and it seems that the majority of the macros
won't
run on it at home! Why is it that a spreadsheet that I have at work has no
issues at all with it running the macros while at home it is riddled with
vb
errors?
- Both versions of Excel are the same...2002 SP3
- I ENSURED that the same libraries are installed on my version at home.

Where else can I look to find what the issue may be? Upon completion of
this
spreadsheet, it will be distributed across the country...I am now
extremely
worried that it won't run properly on all those other computers!!!

Any suggestions/ideas that may save me some gray hairs???



Nigel[_2_]

Compatibility issue?
 
You actually stated that you checked the same libraries were installed, I
was referring to checking that they have been referenced in the project.
But it sounds like they have. You say there are no external references.

How did you fix the UDF that failed? This might give a clue, as will the
exact error codes. Can you confirm that if you re-open this workbook in
your office environment it still works? What might be happening is that
object references, names changing, cell contents may be creating conditions
that cause your code to fail.
--

Regards,
Nigel




"Tom" wrote in message
...
Nigel,
These are what I have both at home and at work as far as references go:
Visual Basic For Applications
Microsoft Excel 10.0 Object Library
OLE Automation
Microsoft Office 10.0 Object Library
Microsoft Outlook 11.0 Object Library
Microsoft Forms 2.0 Object Library

As I said, that was the FIRST thing that I looked at.
Arlette...there are no other files associated with this spreadsheet and it
does not reference any other files/drives/paths etc.
As far as all the errors go...Upon opening up the workbook I started
getting
errors. First one was on a custom function that I am using. error:
FUNCTION
NOT DEFINED
After disabling that macro...several other errors came up that I didn't
write down the exact error names...frustration had set in at that point! I
DO
recall that the second macro that had an error was as follows:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim sh As Worksheet, sh1 As Worksheet
Dim rng As Range, Cell As Range
Dim bVisible As Boolean
Set rng = Worksheets("Main").Range("C8:C17")
If Not Intersect(Target, rng) Is Nothing Then
For Each sh1 In Worksheets
bVisible = False
If LCase(sh1.Name) < "main" Then <----ERROR OCCURED HERE
For Each Cell In rng
Set sh = Nothing
On Error Resume Next
Set sh = Worksheets(Cell.Value)
On Error GoTo 0
If Not sh Is Nothing Then
If sh.Name = sh1.Name Then
bVisible = True
Exit For
End If
End If
Next Cell
If bVisible Then
sh1.Visible = xlSheetVisible
Else
sh1.Visible = xlSheetHidden
End If
End If
Next sh1
End If
End Sub
After getting past this one....there was just error after error after
error...............

Thanks for taking the time to consider my issue here!

"Nigel" wrote:

These normally arise when different version of Excel are involved. But
as
you say you are suing the same version in both places!

Are there any VB project references missing? Goto the VB editor
'Tools' -
'References' and see if there are any missing.

If that is OK, you say "riddled with vb errors"; what type of errors are
you getting?



--

Regards,
Nigel




"Tom" wrote in message
...
I have been slowly developing this spreadsheet for quite some time now
and
have been given a dealine now for completion. I decided to take it home
to
work on it...I open it up and it seems that the majority of the macros
won't
run on it at home! Why is it that a spreadsheet that I have at work has
no
issues at all with it running the macros while at home it is riddled
with
vb
errors?
- Both versions of Excel are the same...2002 SP3
- I ENSURED that the same libraries are installed on my version at
home.

Where else can I look to find what the issue may be? Upon completion of
this
spreadsheet, it will be distributed across the country...I am now
extremely
worried that it won't run properly on all those other computers!!!

Any suggestions/ideas that may save me some gray hairs???




Peter T

Compatibility issue?
 
It really does sound like a reference problem. You say you are using Excel
2002 SP3 on both machines, and you have this reference -

Microsoft Outlook 11.0 Object Library


Do you also have Outlook 2003 installed on both machines, if not that's
where the problem is. If you have Outlook 2002 on the machine with the
failing vba I'd be very surprised the reference is not marked as MISSING,
reinforced by the fact your code fails on a string function, LCase.

You will be able to transport the wb saved in the system with the earlier
version of Outlook to that with the later, but not the other way round
without correcting the reference.

I also wonder if you have two versions of Office installed on one of the
machines. Although you can run multiple versions of Excel, and most other
Office apps, you can only have one version of Outlook installed.

Regards,
Peter T

Microsoft Outlook 11.0 Object Library

"Tom" wrote in message
...
Nigel,
These are what I have both at home and at work as far as references go:
Visual Basic For Applications
Microsoft Excel 10.0 Object Library
OLE Automation
Microsoft Office 10.0 Object Library
Microsoft Outlook 11.0 Object Library
Microsoft Forms 2.0 Object Library

As I said, that was the FIRST thing that I looked at.
Arlette...there are no other files associated with this spreadsheet and it
does not reference any other files/drives/paths etc.
As far as all the errors go...Upon opening up the workbook I started

getting
errors. First one was on a custom function that I am using. error:

FUNCTION
NOT DEFINED
After disabling that macro...several other errors came up that I didn't
write down the exact error names...frustration had set in at that point! I

DO
recall that the second macro that had an error was as follows:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim sh As Worksheet, sh1 As Worksheet
Dim rng As Range, Cell As Range
Dim bVisible As Boolean
Set rng = Worksheets("Main").Range("C8:C17")
If Not Intersect(Target, rng) Is Nothing Then
For Each sh1 In Worksheets
bVisible = False
If LCase(sh1.Name) < "main" Then <----ERROR OCCURED HERE
For Each Cell In rng
Set sh = Nothing
On Error Resume Next
Set sh = Worksheets(Cell.Value)
On Error GoTo 0
If Not sh Is Nothing Then
If sh.Name = sh1.Name Then
bVisible = True
Exit For
End If
End If
Next Cell
If bVisible Then
sh1.Visible = xlSheetVisible
Else
sh1.Visible = xlSheetHidden
End If
End If
Next sh1
End If
End Sub
After getting past this one....there was just error after error after
error...............

Thanks for taking the time to consider my issue here!

"Nigel" wrote:

These normally arise when different version of Excel are involved. But

as
you say you are suing the same version in both places!

Are there any VB project references missing? Goto the VB editor

'Tools' -
'References' and see if there are any missing.

If that is OK, you say "riddled with vb errors"; what type of errors

are
you getting?



--

Regards,
Nigel




"Tom" wrote in message
...
I have been slowly developing this spreadsheet for quite some time now

and
have been given a dealine now for completion. I decided to take it

home to
work on it...I open it up and it seems that the majority of the macros
won't
run on it at home! Why is it that a spreadsheet that I have at work

has no
issues at all with it running the macros while at home it is riddled

with
vb
errors?
- Both versions of Excel are the same...2002 SP3
- I ENSURED that the same libraries are installed on my version at

home.

Where else can I look to find what the issue may be? Upon completion

of
this
spreadsheet, it will be distributed across the country...I am now
extremely
worried that it won't run properly on all those other computers!!!

Any suggestions/ideas that may save me some gray hairs???





tom

Compatibility issue?
 
Nigel,
I never actually fixed the code that failed at home last night. Time
restraints kept me from actually spending any time on it last night - but I
was hoping to be able to work on it this weekend which is why I brought the
file home last night. I never corrected any errors, or attempted to since
they seemed to be too numerous to tackle in the short time I had last night.
Yes...I opened the workbook here at work this morning and it works just fine.
I'll have time this weekend to go over each error in the workbook at home
and see what I come up with.

"Nigel" wrote:

You actually stated that you checked the same libraries were installed, I
was referring to checking that they have been referenced in the project.
But it sounds like they have. You say there are no external references.

How did you fix the UDF that failed? This might give a clue, as will the
exact error codes. Can you confirm that if you re-open this workbook in
your office environment it still works? What might be happening is that
object references, names changing, cell contents may be creating conditions
that cause your code to fail.
--

Regards,
Nigel




"Tom" wrote in message
...
Nigel,
These are what I have both at home and at work as far as references go:
Visual Basic For Applications
Microsoft Excel 10.0 Object Library
OLE Automation
Microsoft Office 10.0 Object Library
Microsoft Outlook 11.0 Object Library
Microsoft Forms 2.0 Object Library

As I said, that was the FIRST thing that I looked at.
Arlette...there are no other files associated with this spreadsheet and it
does not reference any other files/drives/paths etc.
As far as all the errors go...Upon opening up the workbook I started
getting
errors. First one was on a custom function that I am using. error:
FUNCTION
NOT DEFINED
After disabling that macro...several other errors came up that I didn't
write down the exact error names...frustration had set in at that point! I
DO
recall that the second macro that had an error was as follows:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim sh As Worksheet, sh1 As Worksheet
Dim rng As Range, Cell As Range
Dim bVisible As Boolean
Set rng = Worksheets("Main").Range("C8:C17")
If Not Intersect(Target, rng) Is Nothing Then
For Each sh1 In Worksheets
bVisible = False
If LCase(sh1.Name) < "main" Then <----ERROR OCCURED HERE
For Each Cell In rng
Set sh = Nothing
On Error Resume Next
Set sh = Worksheets(Cell.Value)
On Error GoTo 0
If Not sh Is Nothing Then
If sh.Name = sh1.Name Then
bVisible = True
Exit For
End If
End If
Next Cell
If bVisible Then
sh1.Visible = xlSheetVisible
Else
sh1.Visible = xlSheetHidden
End If
End If
Next sh1
End If
End Sub
After getting past this one....there was just error after error after
error...............

Thanks for taking the time to consider my issue here!

"Nigel" wrote:

These normally arise when different version of Excel are involved. But
as
you say you are suing the same version in both places!

Are there any VB project references missing? Goto the VB editor
'Tools' -
'References' and see if there are any missing.

If that is OK, you say "riddled with vb errors"; what type of errors are
you getting?



--

Regards,
Nigel




"Tom" wrote in message
...
I have been slowly developing this spreadsheet for quite some time now
and
have been given a dealine now for completion. I decided to take it home
to
work on it...I open it up and it seems that the majority of the macros
won't
run on it at home! Why is it that a spreadsheet that I have at work has
no
issues at all with it running the macros while at home it is riddled
with
vb
errors?
- Both versions of Excel are the same...2002 SP3
- I ENSURED that the same libraries are installed on my version at
home.

Where else can I look to find what the issue may be? Upon completion of
this
spreadsheet, it will be distributed across the country...I am now
extremely
worried that it won't run properly on all those other computers!!!

Any suggestions/ideas that may save me some gray hairs???



tom

Compatibility issue?
 
Peter,
I actually have Outlook 2003 SP2 here at work....and am using Outlook
Express at home. Also, using XP Pro at work and XP Home Edition at home.
Could this be the issue as you mentioned the different versions of outlook
may be the issue? What options are available to correct this if this in fact
is the issue?

Regards

"Peter T" wrote:

It really does sound like a reference problem. You say you are using Excel
2002 SP3 on both machines, and you have this reference -

Microsoft Outlook 11.0 Object Library


Do you also have Outlook 2003 installed on both machines, if not that's
where the problem is. If you have Outlook 2002 on the machine with the
failing vba I'd be very surprised the reference is not marked as MISSING,
reinforced by the fact your code fails on a string function, LCase.

You will be able to transport the wb saved in the system with the earlier
version of Outlook to that with the later, but not the other way round
without correcting the reference.

I also wonder if you have two versions of Office installed on one of the
machines. Although you can run multiple versions of Excel, and most other
Office apps, you can only have one version of Outlook installed.

Regards,
Peter T

Microsoft Outlook 11.0 Object Library

"Tom" wrote in message
...
Nigel,
These are what I have both at home and at work as far as references go:
Visual Basic For Applications
Microsoft Excel 10.0 Object Library
OLE Automation
Microsoft Office 10.0 Object Library
Microsoft Outlook 11.0 Object Library
Microsoft Forms 2.0 Object Library

As I said, that was the FIRST thing that I looked at.
Arlette...there are no other files associated with this spreadsheet and it
does not reference any other files/drives/paths etc.
As far as all the errors go...Upon opening up the workbook I started

getting
errors. First one was on a custom function that I am using. error:

FUNCTION
NOT DEFINED
After disabling that macro...several other errors came up that I didn't
write down the exact error names...frustration had set in at that point! I

DO
recall that the second macro that had an error was as follows:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim sh As Worksheet, sh1 As Worksheet
Dim rng As Range, Cell As Range
Dim bVisible As Boolean
Set rng = Worksheets("Main").Range("C8:C17")
If Not Intersect(Target, rng) Is Nothing Then
For Each sh1 In Worksheets
bVisible = False
If LCase(sh1.Name) < "main" Then <----ERROR OCCURED HERE
For Each Cell In rng
Set sh = Nothing
On Error Resume Next
Set sh = Worksheets(Cell.Value)
On Error GoTo 0
If Not sh Is Nothing Then
If sh.Name = sh1.Name Then
bVisible = True
Exit For
End If
End If
Next Cell
If bVisible Then
sh1.Visible = xlSheetVisible
Else
sh1.Visible = xlSheetHidden
End If
End If
Next sh1
End If
End Sub
After getting past this one....there was just error after error after
error...............

Thanks for taking the time to consider my issue here!

"Nigel" wrote:

These normally arise when different version of Excel are involved. But

as
you say you are suing the same version in both places!

Are there any VB project references missing? Goto the VB editor

'Tools' -
'References' and see if there are any missing.

If that is OK, you say "riddled with vb errors"; what type of errors

are
you getting?



--

Regards,
Nigel




"Tom" wrote in message
...
I have been slowly developing this spreadsheet for quite some time now

and
have been given a dealine now for completion. I decided to take it

home to
work on it...I open it up and it seems that the majority of the macros
won't
run on it at home! Why is it that a spreadsheet that I have at work

has no
issues at all with it running the macros while at home it is riddled

with
vb
errors?
- Both versions of Excel are the same...2002 SP3
- I ENSURED that the same libraries are installed on my version at

home.

Where else can I look to find what the issue may be? Upon completion

of
this
spreadsheet, it will be distributed across the country...I am now
extremely
worried that it won't run properly on all those other computers!!!

Any suggestions/ideas that may save me some gray hairs???





Peter T

Compatibility issue?
 
Does your code use the Outlook object model, IOW are you doing something
with Outlook, if not remove the reference completely.That should solve the
problem.

If you are working with Outlook, in your home system with OfficeXP (which I
assume includes Outlook) you should be able to change the reference to
Outlook10.

Problem will revert when you transport your Outlook11 ref to your home
machine. Once your code is all working fine, change from "Early Binding" to
"Late Binding". Briefly, that means unticking the Outlook ref, changing any
Outlook object variables so the are declared 'As Object' and changing any
named Outlook constants to their intrinsic values.
Head your modules with 'Option Explicit' and do Debug - Compile project.

Regards,
Peter T

"Tom" wrote in message
...
Peter,
I actually have Outlook 2003 SP2 here at work....and am using Outlook
Express at home. Also, using XP Pro at work and XP Home Edition at home.
Could this be the issue as you mentioned the different versions of outlook
may be the issue? What options are available to correct this if this in

fact
is the issue?

Regards

"Peter T" wrote:

It really does sound like a reference problem. You say you are using

Excel
2002 SP3 on both machines, and you have this reference -

Microsoft Outlook 11.0 Object Library


Do you also have Outlook 2003 installed on both machines, if not that's
where the problem is. If you have Outlook 2002 on the machine with the
failing vba I'd be very surprised the reference is not marked as

MISSING,
reinforced by the fact your code fails on a string function, LCase.

You will be able to transport the wb saved in the system with the

earlier
version of Outlook to that with the later, but not the other way round
without correcting the reference.

I also wonder if you have two versions of Office installed on one of the
machines. Although you can run multiple versions of Excel, and most

other
Office apps, you can only have one version of Outlook installed.

Regards,
Peter T

Microsoft Outlook 11.0 Object Library

"Tom" wrote in message
...
Nigel,
These are what I have both at home and at work as far as references

go:
Visual Basic For Applications
Microsoft Excel 10.0 Object Library
OLE Automation
Microsoft Office 10.0 Object Library
Microsoft Outlook 11.0 Object Library
Microsoft Forms 2.0 Object Library

As I said, that was the FIRST thing that I looked at.
Arlette...there are no other files associated with this spreadsheet

and it
does not reference any other files/drives/paths etc.
As far as all the errors go...Upon opening up the workbook I started

getting
errors. First one was on a custom function that I am using. error:

FUNCTION
NOT DEFINED
After disabling that macro...several other errors came up that I

didn't
write down the exact error names...frustration had set in at that

point! I
DO
recall that the second macro that had an error was as follows:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim sh As Worksheet, sh1 As Worksheet
Dim rng As Range, Cell As Range
Dim bVisible As Boolean
Set rng = Worksheets("Main").Range("C8:C17")
If Not Intersect(Target, rng) Is Nothing Then
For Each sh1 In Worksheets
bVisible = False
If LCase(sh1.Name) < "main" Then <----ERROR OCCURED HERE
For Each Cell In rng
Set sh = Nothing
On Error Resume Next
Set sh = Worksheets(Cell.Value)
On Error GoTo 0
If Not sh Is Nothing Then
If sh.Name = sh1.Name Then
bVisible = True
Exit For
End If
End If
Next Cell
If bVisible Then
sh1.Visible = xlSheetVisible
Else
sh1.Visible = xlSheetHidden
End If
End If
Next sh1
End If
End Sub
After getting past this one....there was just error after error after
error...............

Thanks for taking the time to consider my issue here!

"Nigel" wrote:

These normally arise when different version of Excel are involved.

But
as
you say you are suing the same version in both places!

Are there any VB project references missing? Goto the VB editor

'Tools' -
'References' and see if there are any missing.

If that is OK, you say "riddled with vb errors"; what type of

errors
are
you getting?



--

Regards,
Nigel




"Tom" wrote in message
...
I have been slowly developing this spreadsheet for quite some time

now
and
have been given a dealine now for completion. I decided to take it

home to
work on it...I open it up and it seems that the majority of the

macros
won't
run on it at home! Why is it that a spreadsheet that I have at

work
has no
issues at all with it running the macros while at home it is

riddled
with
vb
errors?
- Both versions of Excel are the same...2002 SP3
- I ENSURED that the same libraries are installed on my version at

home.

Where else can I look to find what the issue may be? Upon

completion
of
this
spreadsheet, it will be distributed across the country...I am now
extremely
worried that it won't run properly on all those other computers!!!

Any suggestions/ideas that may save me some gray hairs???







tom

Compatibility issue?
 
Peter,
Yes, I am using Outlook in parts of my code to auto-email certain sheets to
a list of people. If I merely change the reference to Outlook10 here at
work...will it still work with BOTH systems?
As far as your other suggestions...I'll have to look up how to do those...ie
changing any Outlook object variables so the are declared 'As Object' and
changing any
named Outlook constants to their intrinsic values.
Thanks for the suggestions...I'll have a go with these and hopefully these
solve the problems!

Regards


"Peter T" wrote:

Does your code use the Outlook object model, IOW are you doing something
with Outlook, if not remove the reference completely.That should solve the
problem.

If you are working with Outlook, in your home system with OfficeXP (which I
assume includes Outlook) you should be able to change the reference to
Outlook10.

Problem will revert when you transport your Outlook11 ref to your home
machine. Once your code is all working fine, change from "Early Binding" to
"Late Binding". Briefly, that means unticking the Outlook ref, changing any
Outlook object variables so the are declared 'As Object' and changing any
named Outlook constants to their intrinsic values.
Head your modules with 'Option Explicit' and do Debug - Compile project.

Regards,
Peter T

"Tom" wrote in message
...
Peter,
I actually have Outlook 2003 SP2 here at work....and am using Outlook
Express at home. Also, using XP Pro at work and XP Home Edition at home.
Could this be the issue as you mentioned the different versions of outlook
may be the issue? What options are available to correct this if this in

fact
is the issue?

Regards

"Peter T" wrote:

It really does sound like a reference problem. You say you are using

Excel
2002 SP3 on both machines, and you have this reference -

Microsoft Outlook 11.0 Object Library

Do you also have Outlook 2003 installed on both machines, if not that's
where the problem is. If you have Outlook 2002 on the machine with the
failing vba I'd be very surprised the reference is not marked as

MISSING,
reinforced by the fact your code fails on a string function, LCase.

You will be able to transport the wb saved in the system with the

earlier
version of Outlook to that with the later, but not the other way round
without correcting the reference.

I also wonder if you have two versions of Office installed on one of the
machines. Although you can run multiple versions of Excel, and most

other
Office apps, you can only have one version of Outlook installed.

Regards,
Peter T

Microsoft Outlook 11.0 Object Library
"Tom" wrote in message
...
Nigel,
These are what I have both at home and at work as far as references

go:
Visual Basic For Applications
Microsoft Excel 10.0 Object Library
OLE Automation
Microsoft Office 10.0 Object Library
Microsoft Outlook 11.0 Object Library
Microsoft Forms 2.0 Object Library

As I said, that was the FIRST thing that I looked at.
Arlette...there are no other files associated with this spreadsheet

and it
does not reference any other files/drives/paths etc.
As far as all the errors go...Upon opening up the workbook I started
getting
errors. First one was on a custom function that I am using. error:
FUNCTION
NOT DEFINED
After disabling that macro...several other errors came up that I

didn't
write down the exact error names...frustration had set in at that

point! I
DO
recall that the second macro that had an error was as follows:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim sh As Worksheet, sh1 As Worksheet
Dim rng As Range, Cell As Range
Dim bVisible As Boolean
Set rng = Worksheets("Main").Range("C8:C17")
If Not Intersect(Target, rng) Is Nothing Then
For Each sh1 In Worksheets
bVisible = False
If LCase(sh1.Name) < "main" Then <----ERROR OCCURED HERE
For Each Cell In rng
Set sh = Nothing
On Error Resume Next
Set sh = Worksheets(Cell.Value)
On Error GoTo 0
If Not sh Is Nothing Then
If sh.Name = sh1.Name Then
bVisible = True
Exit For
End If
End If
Next Cell
If bVisible Then
sh1.Visible = xlSheetVisible
Else
sh1.Visible = xlSheetHidden
End If
End If
Next sh1
End If
End Sub
After getting past this one....there was just error after error after
error...............

Thanks for taking the time to consider my issue here!

"Nigel" wrote:

These normally arise when different version of Excel are involved.

But
as
you say you are suing the same version in both places!

Are there any VB project references missing? Goto the VB editor
'Tools' -
'References' and see if there are any missing.

If that is OK, you say "riddled with vb errors"; what type of

errors
are
you getting?



--

Regards,
Nigel




"Tom" wrote in message
...
I have been slowly developing this spreadsheet for quite some time

now
and
have been given a dealine now for completion. I decided to take it
home to
work on it...I open it up and it seems that the majority of the

macros
won't
run on it at home! Why is it that a spreadsheet that I have at

work
has no
issues at all with it running the macros while at home it is

riddled
with
vb
errors?
- Both versions of Excel are the same...2002 SP3
- I ENSURED that the same libraries are installed on my version at
home.

Where else can I look to find what the issue may be? Upon

completion
of
this
spreadsheet, it will be distributed across the country...I am now
extremely
worried that it won't run properly on all those other computers!!!

Any suggestions/ideas that may save me some gray hairs???








Peter T

Compatibility issue?
 
If I merely change the reference to Outlook10 here at
work...will it still work with BOTH systems?


You said you have Outlook11 at work so you won't be able to do that. So
leave your work ref as-is. At home change the ref to Outlook10, assuming you
have Outlook10 on that system.

If your code uses some method that was introduced in the later version it
will fail in the earlier version, irrespective of the reference. Though I'm
not aware of much difference between 10 & 11 so there's a good chance all
will work, with the correct version references.

While developing leave the references in place, though you'll need to
re-check your home wb after moving it from work. When done you will
probably find it easier to convert from Early to Late binding along the
lines I briefly outlined. You can find much more about this topic in the ng

Regards,
Peter T

"Tom" wrote in message
...
Peter,
Yes, I am using Outlook in parts of my code to auto-email certain sheets

to
a list of people. If I merely change the reference to Outlook10 here at
work...will it still work with BOTH systems?
As far as your other suggestions...I'll have to look up how to do

those...ie
changing any Outlook object variables so the are declared 'As Object' and
changing any
named Outlook constants to their intrinsic values.
Thanks for the suggestions...I'll have a go with these and hopefully these
solve the problems!

Regards


"Peter T" wrote:

Does your code use the Outlook object model, IOW are you doing something
with Outlook, if not remove the reference completely.That should solve

the
problem.

If you are working with Outlook, in your home system with OfficeXP

(which I
assume includes Outlook) you should be able to change the reference to
Outlook10.

Problem will revert when you transport your Outlook11 ref to your home
machine. Once your code is all working fine, change from "Early Binding"

to
"Late Binding". Briefly, that means unticking the Outlook ref, changing

any
Outlook object variables so the are declared 'As Object' and changing

any
named Outlook constants to their intrinsic values.
Head your modules with 'Option Explicit' and do Debug - Compile project.

Regards,
Peter T

"Tom" wrote in message
...
Peter,
I actually have Outlook 2003 SP2 here at work....and am using Outlook
Express at home. Also, using XP Pro at work and XP Home Edition at

home.
Could this be the issue as you mentioned the different versions of

outlook
may be the issue? What options are available to correct this if this

in
fact
is the issue?

Regards

"Peter T" wrote:

It really does sound like a reference problem. You say you are using

Excel
2002 SP3 on both machines, and you have this reference -

Microsoft Outlook 11.0 Object Library

Do you also have Outlook 2003 installed on both machines, if not

that's
where the problem is. If you have Outlook 2002 on the machine with

the
failing vba I'd be very surprised the reference is not marked as

MISSING,
reinforced by the fact your code fails on a string function, LCase.

You will be able to transport the wb saved in the system with the

earlier
version of Outlook to that with the later, but not the other way

round
without correcting the reference.

I also wonder if you have two versions of Office installed on one of

the
machines. Although you can run multiple versions of Excel, and most

other
Office apps, you can only have one version of Outlook installed.

Regards,
Peter T

Microsoft Outlook 11.0 Object Library
"Tom" wrote in message
...
Nigel,
These are what I have both at home and at work as far as

references
go:
Visual Basic For Applications
Microsoft Excel 10.0 Object Library
OLE Automation
Microsoft Office 10.0 Object Library
Microsoft Outlook 11.0 Object Library
Microsoft Forms 2.0 Object Library

As I said, that was the FIRST thing that I looked at.
Arlette...there are no other files associated with this

spreadsheet
and it
does not reference any other files/drives/paths etc.
As far as all the errors go...Upon opening up the workbook I

started
getting
errors. First one was on a custom function that I am using. error:
FUNCTION
NOT DEFINED
After disabling that macro...several other errors came up that I

didn't
write down the exact error names...frustration had set in at that

point! I
DO
recall that the second macro that had an error was as follows:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim sh As Worksheet, sh1 As Worksheet
Dim rng As Range, Cell As Range
Dim bVisible As Boolean
Set rng = Worksheets("Main").Range("C8:C17")
If Not Intersect(Target, rng) Is Nothing Then
For Each sh1 In Worksheets
bVisible = False
If LCase(sh1.Name) < "main" Then <----ERROR OCCURED HERE
For Each Cell In rng
Set sh = Nothing
On Error Resume Next
Set sh = Worksheets(Cell.Value)
On Error GoTo 0
If Not sh Is Nothing Then
If sh.Name = sh1.Name Then
bVisible = True
Exit For
End If
End If
Next Cell
If bVisible Then
sh1.Visible = xlSheetVisible
Else
sh1.Visible = xlSheetHidden
End If
End If
Next sh1
End If
End Sub
After getting past this one....there was just error after error

after
error...............

Thanks for taking the time to consider my issue here!

"Nigel" wrote:

These normally arise when different version of Excel are

involved.
But
as
you say you are suing the same version in both places!

Are there any VB project references missing? Goto the VB editor
'Tools' -
'References' and see if there are any missing.

If that is OK, you say "riddled with vb errors"; what type of

errors
are
you getting?



--

Regards,
Nigel




"Tom" wrote in message
...
I have been slowly developing this spreadsheet for quite some

time
now
and
have been given a dealine now for completion. I decided to

take it
home to
work on it...I open it up and it seems that the majority of

the
macros
won't
run on it at home! Why is it that a spreadsheet that I have at

work
has no
issues at all with it running the macros while at home it is

riddled
with
vb
errors?
- Both versions of Excel are the same...2002 SP3
- I ENSURED that the same libraries are installed on my

version at
home.

Where else can I look to find what the issue may be? Upon

completion
of
this
spreadsheet, it will be distributed across the country...I am

now
extremely
worried that it won't run properly on all those other

computers!!!

Any suggestions/ideas that may save me some gray hairs???










tom

Compatibility issue?
 
Many thanks for the assistance!


"Peter T" wrote:

If I merely change the reference to Outlook10 here at
work...will it still work with BOTH systems?


You said you have Outlook11 at work so you won't be able to do that. So
leave your work ref as-is. At home change the ref to Outlook10, assuming you
have Outlook10 on that system.

If your code uses some method that was introduced in the later version it
will fail in the earlier version, irrespective of the reference. Though I'm
not aware of much difference between 10 & 11 so there's a good chance all
will work, with the correct version references.

While developing leave the references in place, though you'll need to
re-check your home wb after moving it from work. When done you will
probably find it easier to convert from Early to Late binding along the
lines I briefly outlined. You can find much more about this topic in the ng

Regards,
Peter T

"Tom" wrote in message
...
Peter,
Yes, I am using Outlook in parts of my code to auto-email certain sheets

to
a list of people. If I merely change the reference to Outlook10 here at
work...will it still work with BOTH systems?
As far as your other suggestions...I'll have to look up how to do

those...ie
changing any Outlook object variables so the are declared 'As Object' and
changing any
named Outlook constants to their intrinsic values.
Thanks for the suggestions...I'll have a go with these and hopefully these
solve the problems!

Regards


"Peter T" wrote:

Does your code use the Outlook object model, IOW are you doing something
with Outlook, if not remove the reference completely.That should solve

the
problem.

If you are working with Outlook, in your home system with OfficeXP

(which I
assume includes Outlook) you should be able to change the reference to
Outlook10.

Problem will revert when you transport your Outlook11 ref to your home
machine. Once your code is all working fine, change from "Early Binding"

to
"Late Binding". Briefly, that means unticking the Outlook ref, changing

any
Outlook object variables so the are declared 'As Object' and changing

any
named Outlook constants to their intrinsic values.
Head your modules with 'Option Explicit' and do Debug - Compile project.

Regards,
Peter T

"Tom" wrote in message
...
Peter,
I actually have Outlook 2003 SP2 here at work....and am using Outlook
Express at home. Also, using XP Pro at work and XP Home Edition at

home.
Could this be the issue as you mentioned the different versions of

outlook
may be the issue? What options are available to correct this if this

in
fact
is the issue?

Regards

"Peter T" wrote:

It really does sound like a reference problem. You say you are using
Excel
2002 SP3 on both machines, and you have this reference -

Microsoft Outlook 11.0 Object Library

Do you also have Outlook 2003 installed on both machines, if not

that's
where the problem is. If you have Outlook 2002 on the machine with

the
failing vba I'd be very surprised the reference is not marked as
MISSING,
reinforced by the fact your code fails on a string function, LCase.

You will be able to transport the wb saved in the system with the
earlier
version of Outlook to that with the later, but not the other way

round
without correcting the reference.

I also wonder if you have two versions of Office installed on one of

the
machines. Although you can run multiple versions of Excel, and most
other
Office apps, you can only have one version of Outlook installed.

Regards,
Peter T

Microsoft Outlook 11.0 Object Library
"Tom" wrote in message
...
Nigel,
These are what I have both at home and at work as far as

references
go:
Visual Basic For Applications
Microsoft Excel 10.0 Object Library
OLE Automation
Microsoft Office 10.0 Object Library
Microsoft Outlook 11.0 Object Library
Microsoft Forms 2.0 Object Library

As I said, that was the FIRST thing that I looked at.
Arlette...there are no other files associated with this

spreadsheet
and it
does not reference any other files/drives/paths etc.
As far as all the errors go...Upon opening up the workbook I

started
getting
errors. First one was on a custom function that I am using. error:
FUNCTION
NOT DEFINED
After disabling that macro...several other errors came up that I
didn't
write down the exact error names...frustration had set in at that
point! I
DO
recall that the second macro that had an error was as follows:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim sh As Worksheet, sh1 As Worksheet
Dim rng As Range, Cell As Range
Dim bVisible As Boolean
Set rng = Worksheets("Main").Range("C8:C17")
If Not Intersect(Target, rng) Is Nothing Then
For Each sh1 In Worksheets
bVisible = False
If LCase(sh1.Name) < "main" Then <----ERROR OCCURED HERE
For Each Cell In rng
Set sh = Nothing
On Error Resume Next
Set sh = Worksheets(Cell.Value)
On Error GoTo 0
If Not sh Is Nothing Then
If sh.Name = sh1.Name Then
bVisible = True
Exit For
End If
End If
Next Cell
If bVisible Then
sh1.Visible = xlSheetVisible
Else
sh1.Visible = xlSheetHidden
End If
End If
Next sh1
End If
End Sub
After getting past this one....there was just error after error

after
error...............

Thanks for taking the time to consider my issue here!

"Nigel" wrote:

These normally arise when different version of Excel are

involved.
But
as
you say you are suing the same version in both places!

Are there any VB project references missing? Goto the VB editor
'Tools' -
'References' and see if there are any missing.

If that is OK, you say "riddled with vb errors"; what type of
errors
are
you getting?



--

Regards,
Nigel




"Tom" wrote in message
...
I have been slowly developing this spreadsheet for quite some

time
now
and
have been given a dealine now for completion. I decided to

take it
home to
work on it...I open it up and it seems that the majority of

the
macros
won't
run on it at home! Why is it that a spreadsheet that I have at
work
has no
issues at all with it running the macros while at home it is
riddled
with
vb
errors?
- Both versions of Excel are the same...2002 SP3
- I ENSURED that the same libraries are installed on my

version at
home.

Where else can I look to find what the issue may be? Upon
completion
of
this
spreadsheet, it will be distributed across the country...I am

now
extremely
worried that it won't run properly on all those other

computers!!!

Any suggestions/ideas that may save me some gray hairs???












All times are GMT +1. The time now is 04:38 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com