PC Review


Reply
Thread Tools Rate Thread

Compatibility issue?

 
 
Tom
Guest
Posts: n/a
 
      30th Nov 2007
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???
 
Reply With Quote
 
 
 
 
Arlette
Guest
Posts: n/a
 
      30th Nov 2007
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...
 
Reply With Quote
 
Nigel
Guest
Posts: n/a
 
      30th Nov 2007
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
(E-Mail Removed)



"Tom" <(E-Mail Removed)> wrote in message
news:A97A46C5-15FF-421E-ACFF-(E-Mail Removed)...
>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???


 
Reply With Quote
 
Tom
Guest
Posts: n/a
 
      30th Nov 2007
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
> (E-Mail Removed)
>
>
>
> "Tom" <(E-Mail Removed)> wrote in message
> news:A97A46C5-15FF-421E-ACFF-(E-Mail Removed)...
> >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???

>

 
Reply With Quote
 
Nigel
Guest
Posts: n/a
 
      30th Nov 2007
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
(E-Mail Removed)



"Tom" <(E-Mail Removed)> wrote in message
news:CB8216AC-0D4D-46CB-A2FD-(E-Mail Removed)...
> 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
>> (E-Mail Removed)
>>
>>
>>
>> "Tom" <(E-Mail Removed)> wrote in message
>> news:A97A46C5-15FF-421E-ACFF-(E-Mail Removed)...
>> >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???

>>


 
Reply With Quote
 
Peter T
Guest
Posts: n/a
 
      30th Nov 2007
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" <(E-Mail Removed)> wrote in message
news:CB8216AC-0D4D-46CB-A2FD-(E-Mail Removed)...
> 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
> > (E-Mail Removed)
> >
> >
> >
> > "Tom" <(E-Mail Removed)> wrote in message
> > news:A97A46C5-15FF-421E-ACFF-(E-Mail Removed)...
> > >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???

> >



 
Reply With Quote
 
Tom
Guest
Posts: n/a
 
      30th Nov 2007
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
> (E-Mail Removed)
>
>
>
> "Tom" <(E-Mail Removed)> wrote in message
> news:CB8216AC-0D4D-46CB-A2FD-(E-Mail Removed)...
> > 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
> >> (E-Mail Removed)
> >>
> >>
> >>
> >> "Tom" <(E-Mail Removed)> wrote in message
> >> news:A97A46C5-15FF-421E-ACFF-(E-Mail Removed)...
> >> >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???
> >>

>

 
Reply With Quote
 
Tom
Guest
Posts: n/a
 
      30th Nov 2007
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" <(E-Mail Removed)> wrote in message
> news:CB8216AC-0D4D-46CB-A2FD-(E-Mail Removed)...
> > 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
> > > (E-Mail Removed)
> > >
> > >
> > >
> > > "Tom" <(E-Mail Removed)> wrote in message
> > > news:A97A46C5-15FF-421E-ACFF-(E-Mail Removed)...
> > > >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???
> > >

>
>
>

 
Reply With Quote
 
Peter T
Guest
Posts: n/a
 
      30th Nov 2007
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" <(E-Mail Removed)> wrote in message
news:BB322B55-3440-4689-AD3A-(E-Mail Removed)...
> 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" <(E-Mail Removed)> wrote in message
> > news:CB8216AC-0D4D-46CB-A2FD-(E-Mail Removed)...
> > > 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
> > > > (E-Mail Removed)
> > > >
> > > >
> > > >
> > > > "Tom" <(E-Mail Removed)> wrote in message
> > > > news:A97A46C5-15FF-421E-ACFF-(E-Mail Removed)...
> > > > >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???
> > > >

> >
> >
> >



 
Reply With Quote
 
Tom
Guest
Posts: n/a
 
      30th Nov 2007
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" <(E-Mail Removed)> wrote in message
> news:BB322B55-3440-4689-AD3A-(E-Mail Removed)...
> > 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" <(E-Mail Removed)> wrote in message
> > > news:CB8216AC-0D4D-46CB-A2FD-(E-Mail Removed)...
> > > > 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
> > > > > (E-Mail Removed)
> > > > >
> > > > >
> > > > >
> > > > > "Tom" <(E-Mail Removed)> wrote in message
> > > > > news:A97A46C5-15FF-421E-ACFF-(E-Mail Removed)...
> > > > > >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???
> > > > >
> > >
> > >
> > >

>
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Compatibility Issue. =?Utf-8?B?QXRvbXNrMDEz?= Windows Vista General Discussion 2 2nd Mar 2007 12:00 AM
Re: Compatibility issue glamart Windows XP Hardware 0 22nd Jan 2007 09:33 PM
XP Compatibility Issue sailorlion Windows XP Hardware 1 7th Dec 2003 12:59 PM
xp compatibility issue Ramesh Gupta Windows XP Security 1 14th Nov 2003 09:08 PM
compatibility issue Gwen Windows XP Accessibility 1 18th Aug 2003 12:03 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:01 PM.