Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Private Sub CommandButton1_Click()
'Define an excel object Dim objExcel As Object 'Open the excel sheet which needs to be changed Set objExcel = CreateObject("Excel.Application") objExcel.Workbooks.Open Filename:=Application.GetOpenFilename 'Replace text of a cell in the 'Risk, Issue Metrics' worksheet objExcel.Sheets("Risk, Issue Metrics").Select objExcel.Cells(9, 1).Value = "No. of minor risks open (i.e. with risk exposure between 3.5 and 0)" 'A subroutine is located in the same worksheet. This needs to be updated with a new code here 'How do it do it? 'Save updated excel sheet and close it objExcel.Workbooks(1).Save objExcel.Workbooks.Close objExcel.Quit Set objExcel = Nothing End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Call a subroutine using variable subroutine name | Excel Discussion (Misc queries) | |||
call excelsheet within excelsheet when user clicks excelsheet ico | Excel Worksheet Functions | |||
How do I exit a macro subroutine? | Excel Worksheet Functions | |||
How can i get autoformat name of range in excelsheet? | Excel Worksheet Functions | |||
How to enter an excelsheet from a ppt presentation? | Excel Discussion (Misc queries) |