Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

vbscript for movings vbscrpt variables to Excel opening in read only mode

Status
Not open for further replies.

kdjonesmtb2

Technical User
Nov 19, 2012
93
US
Hello

The following script opens up excel in read only mode

What is correct way to open the workbook in read write mode?



Set ExcelObject = CreateObject("Excel.Application")
'set xlApp = CreateObject("Excel.Application")
ExcelObject.Workbooks.Open("J:\CCA Medical Claims QTP\Summary Medical Claims CCA2.xlsx")' Default, False)
'ExcelObject.visible = True
''xlApp.UserControl = True
ExcelObject.UserControl=True

ExcelObject.visible = True
'xlApp.UserControl = True

ExcelObject.Sheets(1).Cells(3, 1).value = ICD9_Count_ARE 'Distinct ICD9 count ARE
ExcelObject.Sheets(1).Cells(3, 2).value = ICD9_Count_CCA 'Distinct ICD9 count CCA
ExcelObject.Sheets(1).Cells(3, 3).value = Result1 'Variance
ExcelObject.Sheets(1).Cells(7, 1).value = Procedure_Count_ARE 'Distiinct Procedure Count ARE
ExcelObject.Sheets(1).Cells(7, 2).value = Procedure_Count_CCA 'Distinct Procedure Count CCA
ExcelObject.Sheets(1).Cells(7, 3).value = Result2 'Variance
ExcelObject.Sheets(1).Cells(10, 1).value = QNXT_Claimid_ClaimHeader 'Distinct Claimid QNXT FTP
ExcelObject.Sheets(1).Cells(10, 2).value = ARE_Claimid_CLAIMFACT 'Distinct Claimid CCA ARE'
ExcelObject.Sheets(1).Cells(10, 3).value = Result3 'Variance

ExcelObject.Activeworkbook.Save("J:\CCA Medical Claims QTP\Summary Medical Claims CCA2.xlsx")
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top