Hi,
I was trying to replace an existing worksheet with a new worksheet. The workbook can't get a worksheet replacement.
For example,
worksheet = Nothing
worksheet = tempworksheet
Please help me as soon as possible
Thanks,
Chi Ming
Hello Chi,
I am just checking if you require any further assistance on the matter.
Hi Chi,
Thank you for your feedback. I have been looking into your question and I cannot find any issue with the worksheets. The code that I have used for my tests is:
Dim workbook1 As New Workbook()
Dim worksheet1 = Nothing
Dim worksheet2 As Worksheet = workbook1.Worksheets.Add("Sheet 1")
worksheet2.Rows(0).Cells(0).Value = 42
worksheet1 = worksheet2
Let me know, if I am missing something.