Hi everybody,
I'd like to ask you for help in this particular case:
- I have got an Excel file, that runs a macro that opens another workbook and copies over the data from this workbook
- the problem is that the other workbook runs a macro (launch userform) whenever it's opened, which is annoying for the user.
Do you have any idea, if one can actually somehow turn off "ThisWorkbook" codes?
Private Sub Workbook_Open()
Dim Language_Windows As Integer
Dim Language As Integer
Dim FCFF_Value
'Hodnota Free Cash Flow to the Firm (FCFF)
FCFF_Value = ActiveWorkbook.Worksheets("3_FCF").Range("I64")
'Show
If Application.Max(FCFF_Value) = 0 And Application.Min(FCFF_Value) = 0 Then
'Detect the language of the system
Language_Windows = Application.International(xlCountrySetting)
'Choose the language version according to the system language
If Language_Windows = 420 Then
Language = 1
Else
Language = 2
End If
'Language version that has been chosen by the user already before
Worksheets("1_Info").Range("Language") = Language
Else
'Do nothing
End If
'Opens the first/intial sheet
ActiveWorkbook.Sheets("1_Info").Select
'The choice of the language version of the userform
If Worksheets("1_Info").Range("Language") = 1 Then
'Shows Czech version
UserForm_CZ.Show
Else
'Shows English version
UserForm_EN.Show
End If
End Sub
Thank you for any suggestion!
Bookmarks