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

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).

MARK858

MrExcel MVP
Joined
Nov 12, 2010
Messages
14,308
Office Version
  1. 365
  2. 2010
Platform
  1. Windows
  2. Mobile
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?
 

straycat

New Member
Joined
Feb 1, 2021
Messages
10
Office Version
  1. 2010
Platform
  1. Windows
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
 

MARK858

MrExcel MVP
Joined
Nov 12, 2010
Messages
14,308
Office Version
  1. 365
  2. 2010
Platform
  1. Windows
  2. Mobile
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?
 

straycat

New Member
Joined
Feb 1, 2021
Messages
10
Office Version
  1. 2010
Platform
  1. Windows
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
 

MARK858

MrExcel MVP
Joined
Nov 12, 2010
Messages
14,308
Office Version
  1. 365
  2. 2010
Platform
  1. Windows
  2. Mobile
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:

Forum statistics

Threads
1,148,159
Messages
5,745,116
Members
423,925
Latest member
globaltlg

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
Top