I am having issues converting the following VBA code to VBS. I am a novice in regards to writing VBS, so any assistance would be greatly appreciated.
Public Sub Details()
Set xl = New Excel
Set wb = xl.obj_.Workbooks.Add
Const xlWhole = 1
Const xlPart = 2
Const ColField = "Combined Field2"
Dim k, bfind
Set bfind = x1.ActiveSheet.UsedRange.Cells.Find(what:=ColField, lookat:=xlWhole)
k = bfind.Column
Columns(k).Delete
'create pivot
x1.ActiveSheet.Activate
Set PCache = x1.ActiveWorkbook.PivotCaches.Create(SourceType:=1, SourceData:=Range("A1").CurrentRegion.Address)
x1.Worksheets.Add
x1.ActiveSheet.Name = "Pivot"
x1.ActiveWindow.DisplayGridlines = False
Set pt = x1.ActiveSheet.PivotTables.Add(PivotCache:=PCache, TableDestination:=Range("A1"), TableName:="PivotTable1")
With pt
.InGridDropZones = True
.RowAxisLayout xlTabularRow
.DisplayContextTooltips = False
.ShowDrillIndicators = False
End With
End Sub