Dobrý den, nevíte někdo, jak získat hodnotu dle názvu konstanty?
Imports System.Reflection
Jak nastavit BindingFlags?
Dim ExcelType As Type = Type.GetTypeFromProgID("Excel.Application")
Dim Excel As Object = Activator.CreateInstance(ExcelType)
'???
Dim xlMaximizedValue As Object = ExcelType.GetField("Excel.XlWindowState.xlMaximized").GetValue(Nothing)
Excel.Visible = True
'Const xlMaximized = -4137
Excel.WindowState = xlMaximizedValue
|