Use of Application.Run "Modul1.Macro1" in XLSM convert to XLS 2003

straycat

New Member
Joined
Feb 1, 2021
Messages
10
Office Version
  1. 2010
Platform
  1. Windows
Hello colleagues,

I have an XLSM file that I have to convert to XLS 2003. It has given me some compatibility problem that I have already solved, but I don't know how to use the following command in XLS 2003.
Command in XLSM is : Application.Run "Modul1.Macro1"
I need to use this in XLS 2003, and I don't find how to adapt it.

Thanks in advance
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
As far as I remember there is no difference with Application.Run in 2003. Are you sure that your code shouldn't be
Rich (BB code):
 Application.Run "Module1.Macro1"
, which would be the default name for the module?
 
Upvote 0
Here you can see the vba code. I only need to adapt for example Application.Run "Module8.Macro1" to Excel 2003. Can you please help me?

Private Sub Workbook_Open()
Application.Run "Module8.Macro1"
End Sub
 
Upvote 0
I am afraid that I can't as I can see nothing there that shouldn't run in 2003 if the module name/sheet name are correct, the code is in the same workbook and you have put the code in the ThisWorkbook module.

Are you getting any error messages?
What code is in Macro1?
 
Upvote 0
Thi is a more complet VBA text


Private Sub Workbook_Open()
If ThisWorkbook.ReadOnly Then ActiveWorkbook.Close False
Application.EnableCancelKey = xlDisabled
tpo = "00:00:02"
Application.Wait Now + TimeValue(tpo)
ActiveSheet.Unprotect Password:="xx"
Application.Run "Module1.Limit"
ActiveSheet.Protect Password:="xx", AllowFiltering:=True
ActiveSheet.EnableSelection = xlUnlockedCells
Dim Expdate As Date
Expdate = Hoja2.Range("J9") 'Limit
If Date > Expdate Then
MsgBox "The file has expired"
license4 = InputBox("Administrator Password:")
If license4 <> "AAA" Then
MsgBox "Not Correct. You can download it again."
link = Sheet7.Range("O9")
FollowHyperlink Address:=link, NewWindow:=True
Application.Run "Module8.Out"
End If
End If

End Sub
 
Upvote 0
That sub is not called Macro1. It is also not much help when you don't post your actual codes.

You would be better to insert msgbox's before all the Application.Run's to make sure that the code is reaching them (and do the same in the macro's you are calling).
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,867
Messages
6,181,480
Members
453,046
Latest member
Excelvbaexpert

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