07-16-2010, 11:58 AM 
		
	
	
		Is possible run a excel macro saved in str variable?
	
	
	
	
	
| 
					 Excel Runmacro
				 | 
| 
		
		
		07-16-2010, 11:58 AM 
		
	 
		Is possible run a excel macro saved in str variable?
	 
		
		
		07-16-2010, 12:04 PM 
		
	 
		Exact macro - probably not. But look in Excel COM interfaces, maybe you can add macro to Excel and then run it. Or change it a little and run with VbsExec. 
		
		
		07-16-2010, 12:20 PM 
		
	 
		I found: VBScript - Add a Macro to an Excel Spreadsheet Set objExcel = CreateObject("Excel.Application") objExcel.Visible = True objExcel.DisplayAlerts = False Set objWorkbook = objExcel.Workbooks.Open("C:\scripts\test.xls") Set xlmodule = objworkbook.VBProject.VBComponents.Add(1) strCode = _ "sub test()" & vbCr & _ " msgbox ""Inside the macro"" " & vbCr & _ "end sub" xlmodule.CodeModule.AddFromString strCode objWorkbook.SaveAs "c:\scripts\test.xls" objExcel.Quit can you help to convert to QM function? 
		
		
		07-16-2010, 12:40 PM 
		
	 
		Macro Macro1416  ;/exe 1test Macro Macro1418 
		
		
		07-16-2010, 12:45 PM 
		
	 
		Thanks.
	 | 
| 
					« Next Oldest | Next Newest »
				 |