ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   hard drive swap means vba code isn't running (https://www.excelbanter.com/excel-programming/323945-hard-drive-swap-means-vba-code-isnt-running.html)

Doug Wills

hard drive swap means vba code isn't running
 
Hello All,

I am hoping someone can help me. Over the last few years, I have developed
an extensive list of programs in VBA under Excel to automate various
business tasks. These have always worked fine. Recently I had to re-install
Win2k to a new hard drive (I corrupted my registry on the old installation).
I have reloaded Office (2000 Pro) and copied over all of my spreadsheets.

Everything looks ok, however, when I try to run one of my programs, it bombs
with a message stating "Compile error. Can't find project or library." I am
sure that I haven't reinstalled something correctly, but don't know where to
look.

Two other things that may or may not be relevant. One, I had VB6 installed
on the old harddrive but not on the new one. I just purchased vb.net and
have not yet installed it, but I can't figure out why that would cause the
problem. Shouldn't the installation of VB6 or VB.Net be irrelevant? Two,
when the code aborts, it is highlighting a line that reads "Rundate =
Mid(Data, 43, 22)" with the MID highlighted. Don't know if either of these
is an issue, but once again, I can't figure out why they would be.

Any help is greatly appreciated. I've got some Managers waiting to hear what
their monthly rankings are and this is holding up the whole process.

Thanks

Doug Wills



Tom Ogilvy

hard drive swap means vba code isn't running
 
With only one workbook open, run the code until you get the error.

then go to tools=References (in the VBE) (you may have to hit the reset
button first) and look at the list of references selected. At least one
will appear as MISSING.

any missing references are the cause of your problem. If you don't need
them, uncheck them. If you do, you need to install that library.

References are stored with the workbook. when you do Tools=References, you
are looking at the references associated with the activeproject -- the one
highlighted in the project explorer. Make sure you are looking at the
correct project when you do it.

--
Regards,
Tom Ogilvy

"Doug Wills" <doug wills at rtobestway d0t c0m wrote in message
...
Hello All,

I am hoping someone can help me. Over the last few years, I have developed
an extensive list of programs in VBA under Excel to automate various
business tasks. These have always worked fine. Recently I had to

re-install
Win2k to a new hard drive (I corrupted my registry on the old

installation).
I have reloaded Office (2000 Pro) and copied over all of my spreadsheets.

Everything looks ok, however, when I try to run one of my programs, it

bombs
with a message stating "Compile error. Can't find project or library." I

am
sure that I haven't reinstalled something correctly, but don't know where

to
look.

Two other things that may or may not be relevant. One, I had VB6 installed
on the old harddrive but not on the new one. I just purchased vb.net and
have not yet installed it, but I can't figure out why that would cause the
problem. Shouldn't the installation of VB6 or VB.Net be irrelevant? Two,
when the code aborts, it is highlighting a line that reads "Rundate =
Mid(Data, 43, 22)" with the MID highlighted. Don't know if either of these
is an issue, but once again, I can't figure out why they would be.

Any help is greatly appreciated. I've got some Managers waiting to hear

what
their monthly rankings are and this is holding up the whole process.

Thanks

Doug Wills





Doug Wills

hard drive swap means vba code isn't running
 

"Tom Ogilvy" wrote in message
...
With only one workbook open, run the code until you get the error.

then go to tools=References (in the VBE) (you may have to hit the reset
button first) and look at the list of references selected. At least one
will appear as MISSING.

any missing references are the cause of your problem. If you don't need
them, uncheck them. If you do, you need to install that library.

References are stored with the workbook. when you do Tools=References,

you
are looking at the references associated with the activeproject -- the one
highlighted in the project explorer. Make sure you are looking at the
correct project when you do it.

--
Regards,
Tom Ogilvy



Tom,


Thanks for the quick response. Right on target and worked like a charm. It
seems that MSMAPI32.OCX was trying to load but wasn't in my WINNT/SYSTEM32
folder. Removing the reference fixed this particular program, and I will
spend some time checking the others now. I really appreciate the help.

As a side note, is there any benefit to copying this file over? or is simply
removing the refenrence good enough? I believe that the MSMAPI ocx was used
to test sending some email directly from Excel, but I never got very far and
I never implemented it (I may be wrong - I don't remember exactly why this
reference was added for sure.)

Either way, I seem to be back on track. Thanks a lot for your help.

Doug


"Doug Wills" <doug wills at rtobestway d0t c0m wrote in message
...
Hello All,

I am hoping someone can help me. Over the last few years, I have

developed
an extensive list of programs in VBA under Excel to automate various
business tasks. These have always worked fine. Recently I had to

re-install
Win2k to a new hard drive (I corrupted my registry on the old

installation).
I have reloaded Office (2000 Pro) and copied over all of my

spreadsheets.

Everything looks ok, however, when I try to run one of my programs, it

bombs
with a message stating "Compile error. Can't find project or library." I

am
sure that I haven't reinstalled something correctly, but don't know

where
to
look.

Two other things that may or may not be relevant. One, I had VB6

installed
on the old harddrive but not on the new one. I just purchased vb.net and
have not yet installed it, but I can't figure out why that would cause

the
problem. Shouldn't the installation of VB6 or VB.Net be irrelevant? Two,
when the code aborts, it is highlighting a line that reads "Rundate =
Mid(Data, 43, 22)" with the MID highlighted. Don't know if either of

these
is an issue, but once again, I can't figure out why they would be.

Any help is greatly appreciated. I've got some Managers waiting to hear

what
their monthly rankings are and this is holding up the whole process.

Thanks

Doug Wills







Tom Ogilvy

hard drive swap means vba code isn't running
 
I think that control is distributed with VB6. Unless you know you are going
to use it, I don't know that there is a need to install it. If you want to
send email with Excel, Ron de Bruin has documented a number of techniques
(none of which require this control).

Ron de Bruin
http://www.rondebruin.nl/sendmail.htm
http://msdn.microsoft.com/library/en...odc_xlmail.asp

--
Regards,
Tom Ogilvy

"Doug Wills" <doug wills at rtobestway d0t c0m wrote in message
...

"Tom Ogilvy" wrote in message
...
With only one workbook open, run the code until you get the error.

then go to tools=References (in the VBE) (you may have to hit the reset
button first) and look at the list of references selected. At least one
will appear as MISSING.

any missing references are the cause of your problem. If you don't need
them, uncheck them. If you do, you need to install that library.

References are stored with the workbook. when you do Tools=References,

you
are looking at the references associated with the activeproject -- the

one
highlighted in the project explorer. Make sure you are looking at the
correct project when you do it.

--
Regards,
Tom Ogilvy



Tom,


Thanks for the quick response. Right on target and worked like a charm. It
seems that MSMAPI32.OCX was trying to load but wasn't in my WINNT/SYSTEM32
folder. Removing the reference fixed this particular program, and I will
spend some time checking the others now. I really appreciate the help.

As a side note, is there any benefit to copying this file over? or is

simply
removing the refenrence good enough? I believe that the MSMAPI ocx was

used
to test sending some email directly from Excel, but I never got very far

and
I never implemented it (I may be wrong - I don't remember exactly why this
reference was added for sure.)

Either way, I seem to be back on track. Thanks a lot for your help.

Doug


"Doug Wills" <doug wills at rtobestway d0t c0m wrote in message
...
Hello All,

I am hoping someone can help me. Over the last few years, I have

developed
an extensive list of programs in VBA under Excel to automate various
business tasks. These have always worked fine. Recently I had to

re-install
Win2k to a new hard drive (I corrupted my registry on the old

installation).
I have reloaded Office (2000 Pro) and copied over all of my

spreadsheets.

Everything looks ok, however, when I try to run one of my programs, it

bombs
with a message stating "Compile error. Can't find project or library."

I
am
sure that I haven't reinstalled something correctly, but don't know

where
to
look.

Two other things that may or may not be relevant. One, I had VB6

installed
on the old harddrive but not on the new one. I just purchased vb.net

and
have not yet installed it, but I can't figure out why that would cause

the
problem. Shouldn't the installation of VB6 or VB.Net be irrelevant?

Two,
when the code aborts, it is highlighting a line that reads "Rundate =
Mid(Data, 43, 22)" with the MID highlighted. Don't know if either of

these
is an issue, but once again, I can't figure out why they would be.

Any help is greatly appreciated. I've got some Managers waiting to

hear
what
their monthly rankings are and this is holding up the whole process.

Thanks

Doug Wills









Doug Wills

hard drive swap means vba code isn't running
 
Tom,

Once again, a great big "Thank you"!


-Doug

"Tom Ogilvy" wrote in message
...
I think that control is distributed with VB6. Unless you know you are

going
to use it, I don't know that there is a need to install it. If you want

to
send email with Excel, Ron de Bruin has documented a number of techniques
(none of which require this control).

Ron de Bruin
http://www.rondebruin.nl/sendmail.htm
http://msdn.microsoft.com/library/en...odc_xlmail.asp

--
Regards,
Tom Ogilvy

"Doug Wills" <doug wills at rtobestway d0t c0m wrote in message
...

"Tom Ogilvy" wrote in message
...
With only one workbook open, run the code until you get the error.

then go to tools=References (in the VBE) (you may have to hit the

reset
button first) and look at the list of references selected. At least

one
will appear as MISSING.

any missing references are the cause of your problem. If you don't

need
them, uncheck them. If you do, you need to install that library.

References are stored with the workbook. when you do

Tools=References,
you
are looking at the references associated with the activeproject -- the

one
highlighted in the project explorer. Make sure you are looking at the
correct project when you do it.

--
Regards,
Tom Ogilvy



Tom,


Thanks for the quick response. Right on target and worked like a charm.

It
seems that MSMAPI32.OCX was trying to load but wasn't in my

WINNT/SYSTEM32
folder. Removing the reference fixed this particular program, and I will
spend some time checking the others now. I really appreciate the help.

As a side note, is there any benefit to copying this file over? or is

simply
removing the refenrence good enough? I believe that the MSMAPI ocx was

used
to test sending some email directly from Excel, but I never got very far

and
I never implemented it (I may be wrong - I don't remember exactly why

this
reference was added for sure.)

Either way, I seem to be back on track. Thanks a lot for your help.

Doug


"Doug Wills" <doug wills at rtobestway d0t c0m wrote in message
...
Hello All,

I am hoping someone can help me. Over the last few years, I have

developed
an extensive list of programs in VBA under Excel to automate various
business tasks. These have always worked fine. Recently I had to
re-install
Win2k to a new hard drive (I corrupted my registry on the old
installation).
I have reloaded Office (2000 Pro) and copied over all of my

spreadsheets.

Everything looks ok, however, when I try to run one of my programs,

it
bombs
with a message stating "Compile error. Can't find project or

library."
I
am
sure that I haven't reinstalled something correctly, but don't know

where
to
look.

Two other things that may or may not be relevant. One, I had VB6

installed
on the old harddrive but not on the new one. I just purchased vb.net

and
have not yet installed it, but I can't figure out why that would

cause
the
problem. Shouldn't the installation of VB6 or VB.Net be irrelevant?

Two,
when the code aborts, it is highlighting a line that reads "Rundate

=
Mid(Data, 43, 22)" with the MID highlighted. Don't know if either of

these
is an issue, but once again, I can't figure out why they would be.

Any help is greatly appreciated. I've got some Managers waiting to

hear
what
their monthly rankings are and this is holding up the whole process.

Thanks

Doug Wills












All times are GMT +1. The time now is 08:46 AM.

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