Macro not working on friend's computer

LesleyClark

Board Regular
Joined
Feb 15, 2010
Messages
122
Dear All

I sent a Workbook with the below macro (digitally signed) to a friend, who has Excel 2003, which he downloaded.

When he runs the macro button, and hits Yes at the message box point, it then proceeds to perform a "file conversion". Whenever he downloads my spreadsheets to his documents a "file conversion" takes place (he has 2003 and I have 2007). However, this has never occurred during the running of the macro.

Then nothing else happens. It neither saves a file copy as per the coding, nor deletes the values in the Database.

The macro works fine on my system and I have run the compatibility checker.

Can anyone help with this please?

Code:
Sub ArchiveWorkbook()

Dim NewWorkBook As String
Dim CurrentWorkBook As String
Dim TheDate As String
Dim sh As Worksheet
Dim Finalrow As Integer, Finalcolumn As Integer
Dim MyMsg As String
Dim MyTitle As String
Dim Response As String

Application.ScreenUpdating = False
Application.DisplayAlerts = False

On Error Resume Next

TheDate = Format(Date, "d-m-yyyy")
NewWorkBook = ActiveWorkbook.Path & "\" & "FG_Archived_On " & TheDate & ".xlsm"
CurrentWorkBook = "FG_Version_Current.xlsm"
MyTitle = "Year End Procedure"
MyMsg = "This action will clear all values from the Database.  Are you sure you wish to continue?"
Response = MsgBox(MyMsg, vbExclamation + vbYesNo, MyTitle)

Select Case Response
Case Is = vbNo
Exit Sub


Case Is = vbYes

ActiveWorkbook.SaveAs Filename:=NewWorkBook
Workbooks(NewWorkBook).Save
Workbooks(NewWorkBook).Close


Workbooks.Open (CurrentWorkBook)
Worksheets("Database").Open

Set sh = Workbooks(CurrentWorkBook).Worksheets("Database")
Finalrow = sh.Cells(sh.Rows.Count, 1).End(xlUp).Row
Finalcolumn = sh.Cells(1, sh.Columns.Count).End(xlToLeft).Column


sh.Cells(2, 2).Resize(Finalrow, Finalcolumn).Delete

Workbooks(CurrentWorkBook).Save


End Select
End Sub


Thanks in advance
Lesley
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
Hi Alpha Frog

Thanks for reply.
I don't see how he could use .xls extension, as surely the macro wouldn't run at all. I have sent him lots of spreadsheets with macros in the past (which he downloads) and this has never occurred before.
He does get my message box display, so the macro starts to work.
This is a mystery, as I have just tested on my husband's computer (Excel 2007) and it works fine there. Could it be down to Excel 2003
Any other suggestions?
Lesley
 
Upvote 0
Can you have your friend comment out the On Error Resume Next line and then run the macro to see what line of code it errors on?

I'll bet ya a $100 it has something to do with the file extension.
 
Upvote 0
Hi Alpha Frog
Thanks for replying again.
I will take up your suggestion and get my friend to do as you suggest.
I must admit the file extension hadn't occurred to me!

I guess I am still only just above novice on a good day!
Thanks for your help
Regards
Lesley
 
Upvote 0
Hi Alpha Frog

I just wanted to confirm you were right and so you are not down $100.
I was getting my xls and xlr extensions muddled up. I thought xls was a regular not macro enabled file extension
I am very grateful. Thanks very much
Lesley
 
Upvote 0

Forum statistics

Threads
1,213,562
Messages
6,114,326
Members
448,564
Latest member
ED38

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top