Thread: defined object
View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default defined object

I don't use Norton, but I'd suggest disabling it (just temporarily) to see if
that helped.



dan wrote:

Hi Dave,
Here is my history. My computer crushed. I restored it back to factory
condition.
Downloaded updates from Microsoft. I was setting up all my Excel files
references, until I encountered the object problem.

I changed the option to competible with previous version. I also enabled
Microsoft
Firewall in Excel. But I left Norton Firewall on. At each opening Excel, it
was
requesting a virus scan, but never finished it, even after several restart
attempts.

I removed the Office XP through Add/Remove and re-install it from the disk.
Now all I get is the Excel background with no contents, not even requesting
a
virus scan. Always said "ready" in the status bar.

Who might be able to help me? Desperately, Thanks

"Dave Peterson" wrote in message
...
Make sure you have a reference to Microsoft Scripting Runtime (under
Tools|References in the VBE).

I'm betting that you copied the code from one workbook (with the
reference) to a
different workbook that doesn't have that reference (yet!).



dan wrote:

I am getting a Compile error: message with the following Macro which was
working before.
The macro was to backup a folder "shortxls" as "shortxlsmmddyy"

Sub MDshortxlsmmddyy()
Dim myOldFolder As String
Dim myNewFolder1 As String
Dim datecode As String
Dim FSO As Scripting.FileSystemObject
' The statement above kick out an error "User-defined type not defined"
datecode = Format(Date, "mmddyy")
Set FSO = New Scripting.FileSystemObject
myOldFolder = "D:\Documents and Settings\Dan\Desktop\shortxls"
myNewFolder1 = "D:\MyBackup\all shortxls\shortxls" & datecode
If FSO.FolderExists(myOldFolder) Then
If FSO.FolderExists(myNewFolder1) = False Then
FSO.CopyFolder Source:=myOldFolder, _
Destination:=myNewFolder1
Else
MsgBox "Not Copied in all shortxls!"
End If
End If
End Sub

Please Help,
Thanks


--

Dave Peterson


--

Dave Peterson