excel - Error 9 with VBA -
i have little problem code. keeps failing problem
dim emptyrow long dim ksheet worksheet set ksheet = activeworkbook.sheets("customer") emptyrow = worksheetfunction.counta(range("a:a")) + 1 ksheet.cells(emptyrow, 2).value = x.text ksheet.cells(emptyrow, 3).value = y.text
what im trying simple: have 2 buttons on sheet 1. sheet needs remain active time. button brings userform, can input data. info inserted sheet "customer".
edit: gives me error 9 setting ksheet
could help me out?
kind regards
the (name) of sheet customer, actual name sheet2.
correct code is:
set ksheet = activeworkbook.sheets("sheet2")
excel vba excel-vba
No comments:
Post a Comment