Quantcast
Channel: Microsoft Office 365
Viewing all articles
Browse latest Browse all 17713

Please help me to debug this VB code

$
0
0

Public wb As Workbook
Public ErrDesc() As String

'global workbook variable for new workbook
Public Sub DocumentError()

Dim Rng As Excel.Range
Dim ln_count As Long
Dim RowNum As Long
Dim response As Variant
Dim RowNum_Arr(0 To 5000) As String


Application.Cursor = xlWait
Application.DisplayAlerts = False

Set wb = Workbooks.Add
Application.ScreenUpdating = False

Sheets("Sheet2").Select
Sheets("Sheet2").Delete

Sheets("Sheet3").Select
Sheets("Sheet3").Delete

Rows("1:1").RowHeight = 18

Range("A1").Value = "S.No."
Range("B1").Value = "Feed File Row Number"
Range("C1").Value = "Error Description"

Columns("A:A").ColumnWidth = 9
Columns("B:B").ColumnWidth = 20
Columns("C:C").ColumnWidth = 85

Rows("1:1").Select
With Selection.Font
.Name = "Times New Roman"
.Size = 10
.Strikethrough = False
.Superscript = False
.Subscript = False
...


Viewing all articles
Browse latest Browse all 17713

Trending Articles