I want to update an excel sheet using form and not directly by entering into sheet.
Could anyone please help with ideas, as this is a big excel designing a userform would be critical.
thanks regards
I want to update an excel sheet using form and not directly by entering into sheet.
Could anyone please help with ideas, as this is a big excel designing a userform would be critical.
thanks regards
A sample code
Dim xlApp As New Excel.Application
Dim xlWB As Excel.Workbook
Dim xlWS As Excel.Worksheet
'xlApp.Visible = True ' Uncomment if you need excel to be visible'
xlWB = xlApp.Workbooks.Open("C:\YourExcelFile.xlsx")
xlWS = xlWB.Worksheets("SheetName")
Dim ExcelData(2) As String
ExcelData(0) = "YourData1"
ExcelData(1) = "YourData2"
xlWS.Cells(4, 1).Value = ExcelData(0) ' Raw no. 4, Col no. 1 - ie. cell A4'
xlWS.Cells(4, 2).Value = ExcelData(1) ' Raw no. 4, Col no. 2 - ie. cell B4
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.