From MSAccess, I am creating and populating an XLS sheet. All is working as expected. As a last step, I want to clean-up the XLS to replace "0" values with "".
Modelling from an XLS Macro, I attempted the following, but produces an Object Required err msg from MSAccess VBA:
Dim appXLS As Object
Dim wbk As Object
Dim wks1 As Object
Dim wks2 As Object
Dim wks3 As Object
Dim wks4 As Object
Set appXLS = CreateObject("Excel.Application")
Set wbk = appXLS.Workbooks.Add(1)
appXLS.Visible = True
wbk.Activate
Set wks4 = wbk.Sheets.Add(After:=wbk.Sheets(wbk.Sheets.COUNT))
wbk.Sheets(4).NAME = "Item Detail"
Set wks4 = wbk.ActiveSheet
'>>populate and format the XLS from MSAccess VBA
'... it's working as required
'Clean-Up:
wks4.Range("P:P").Select
Selection.Replace What:="0", Replacement:="", LookAt:=xlWhole, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
Any suggestions to correct this approach in MSAccess VBA?