Dim s As String
Dim ti1 As String
Dim st As String
Dim sdate As String
Dim smonth As String
Dim syear As String
Dim shour As String
Dim smin As String
Dim sfn As String
Dim smin1 As Integer
Dim shour1 As Integer
Dim shour2 As String
Dim eti As String
Dim eti1 As String
Dim u As String
'Dim st As String
Dim f As String
Dim query As String
Dim k As String
Dim colnm As String
Dim L As String
Dim TR As String
Dim PRO As String
Dim oExcel As Object
Dim oBook As Object
Dim oSheet As Object
Dim myTime As DateTime
Dim myTime1 As String
Dim myTime2 As String
Dim mytime3 As String
Dim mytime4 As String
Dim hourdiff As String
Dim mindiff As String
Dim seconddiff As String
Dim starttime As String
Dim sep As String = ":"
Dim methodName As String
Dim methodName1 As String
Dim i As Integer = 3
Dim j As Integer = 3
Dim z As Integer = 3
Dim hour1 As String
Dim mini1 As String
Dim second1 As String
Dim hour2 As String
Dim mini2 As String
Dim second2 As String
Dim str As String = ""
Dim userid As String
Dim oExcel9 As Object
Dim oBook9 As Object
Dim oSheet9 As Object
Dim oExcel7 As Object
Dim oBook7 As Object
Dim oSheet7 As Object
Public Enum XLColor
Aqua = 42
Black = 1
Blue = 5
BlueGray = 47
BrightGreen = 4
Brown = 53
Cream = 19
DarkBlue = 11
DarkGreen = 51
DarkPurple = 21
DarkRed = 9
DarkTeal = 49
DarkYellow = 12
Gold = 44
Gray25 = 15
Gray40 = 48
Gray50 = 16
Gray80 = 56
Green = 10
Indigo = 55
Lavender = 39
LightBlue = 41
LightGreen = 35
LightLavender = 24
LightOrange = 45
LightTurquoise = 20
LightYellow = 36
Lime = 43
NavyBlue = 23
OliveGreen = 52
Orange = 46
PaleBlue = 37
Pink = 7
Plum = 18
PowderBlue = 17
Red = 3
Rose = 38
Salmon = 22
SeaGreen = 50
SkyBlue = 33
Tan = 40
Teal = 14
Turquoise = 8
Violet = 13
White = 2
Yellow = 6
End Enum
Public Sub methodnamefiningfunction()
methodName = New StackFrame(1, True).GetMethod().Name
End Sub
Public Sub transferingmethodnametoexcel()
myTime = DateTime.Now
starttime = myTime.Millisecond
Dim passed As Integer
''count and enter your total method here tot
Dim tot As Integer = 44
Dim failed As Integer
passed = z - 2
failed = tot - passed
oSheet.cells(z, 1).value = methodName + "Action"
oSheet.cells(z, 1).Interior.ColorIndex = XLColor.Cream
oSheet.range("B1").value = "Event participation without Credit Limit ( Buyer)"
oSheet.range("A1:D1").Interior.ColorIndex = XLColor.Aqua
oSheet.Range(oSheet.Cells(1, 1), oSheet.Cells(1, 4)).Merge()
'oSheet.range("A1").value = "LOGIN SCREEN VERIFICATION"
oSheet.range("A2:D2").Interior.ColorIndex = XLColor.LightOrange
oSheet.cells(2, 1).value = "Event name"
oSheet.cells(2, 2).value = "Start date and time"
oSheet.cells(2, 3).value = "End date and time"
oSheet.cells(2, 4).value = "Status(Passed/failed)"
'oSheet.cells(1, 5).value = "Duration"
'oSheet.cells(1, 6).value = "Total method"
'oSheet.cells(1, 7).value = "Faild cases"
'oSheet.cells(1,
.value = "Passed cases"
'oSheet.cells(2, 6).value = tot
'oSheet.cells(2, 7).value = faild
'oSheet.cells(2,
.value = passed
z = z + 1
oSheet.cells(z, 1).value = "Total method"
oSheet.cells(z, 1).Interior.ColorIndex = XLColor.Gray25
oSheet.cells(z + 1, 1).value = "Failed cases"
oSheet.cells(z + 1, 1).Interior.ColorIndex = XLColor.Gray25
oSheet.cells(z + 2, 1).value = "Passed cases"
oSheet.cells(z + 2, 1).Interior.ColorIndex = XLColor.Gray25
oSheet.cells(z, 2).value = tot
oSheet.cells(z + 1, 2).value = failed
oSheet.cells(z + 2, 2).value = passed
oSheet.cells(z, 2).Interior.ColorIndex = XLColor.Gray25
oSheet.cells(z + 1, 2).Interior.ColorIndex = XLColor.Gray25
oSheet.cells(z + 2, 2).Interior.ColorIndex = XLColor.Gray25
End Sub
Public Sub starttimefunction()
myTime = DateTime.Now
starttime = myTime.Millisecond
myTime1 = Now.Millisecond
hour1 = myTime.Hour
mini1 = myTime.Minute
second1 = myTime.Second
oSheet.cells(i, 2).value = myTime + sep + starttime
oSheet.cells(j, 2).Interior.ColorIndex = XLColor.Cream
i = i + 1
End Sub
Public Sub endtimefunction()
myTime = DateTime.Now
starttime = myTime.Millisecond
myTime2 = Now.Millisecond
hour2 = myTime.Hour
mini2 = myTime.Minute
second2 = myTime.Second
oSheet.cells(j, 3).value = myTime + sep + starttime
oSheet.cells(j, 3).Interior.ColorIndex = XLColor.Cream
oSheet.cells(j, 4).value = "PASSED"
If (j <> 1) Then
oSheet.cells(j, 4).Interior.ColorIndex = XLColor.SeaGreen
End If
'If (myTime2 < myTime1) Then
' oSheet.cells(j, 5).value = hourdiff + mindiff + mytime3
'Else
' oSheet.cells(j, 5).value = hourdiff + mindiff + seconddiff + mytime3
'End If
'oSheet.cells(j, 5).Interior.ColorIndex = XLColor.Cream
j = j + 1
End Sub
Public Sub callingcommanmethod()
transferingmethodnametoexcel()
End Sub
Public Sub excelclosefunction()
oBook.Save()
'oBook.close()
'oBook.Quit()
'oBook = Nothing
End Sub