Counting from a cell / Importing and Exporting to Excel.
So I'm having troubles getting it to start. Nothing is put into the excel cell.
Code:
Private Sub Button4_Click(sender As Object, e As EventArgs) Handles Button4.Click
workbook = APP.Workbooks.Open("C:\Users\Callum\Documents\new.xlsx")
worksheet = workbook.Worksheets("sheet1")
counter += 1
worksheet.Cells(1, 1).Value = counter.ToString("D5")
Me.Close()
End Sub
The
I assume is meant for me to edit? but I need the program to do it itself. The code needs to the previous cell from excel and add 1 to it
Re: Counting from a cell / Importing and Exporting to Excel.