Ok, that was that problem. Thanks, I didn’t see that.
It runs now, but it’s not putting the info in the cell.
The first cell if "F11". It is a VB6 program putting the results of a
question in an excel sheet. The Information going into the cell it the
"Form1.Label1.Caption".
Did I tell you I'm VERY new to VB ..... Self taught, can you tell? No
professional training what so ever.
Thanks for your help !!
___________________________________________________________
Sub EmpRecord()
Dim FileNamePath As String
Dim FileName As String
Dim S1 As Excel.Worksheet
Dim EmpNumber As String
Dim EmpName As String
Dim EName As String
Dim SheetName As String
Dim EmpRecord As String
EmpRecord = Form1.Readout
EmpName = ActiveSheet.Cells(2, 2)
ActiveSheet.Range("A10") = Format(Now, "Short Date")
If IsEmpty(m_XLApp.ActiveCell.Offset(0, 1)) Then
Set Cell = m_XLApp.ActiveCell.Offset(0, 1)
Else
Set Cell = m_XLApp.ActiveCell.End(xlToRight)(1, 2)
End If
If Cell.Column > 7 Then
Set Cell = Cells(Cell.Row, 1)
End If
Cell.Select
Form1.Label1.Caption
Form1.Readout2 = Format("Employee Name : " + EmpName) & vbCrLf & _
Format("Employee Number : " + EmpRecord) & vbCrLf & _
Format("Time : " + Form1.Label1.Caption)
Form1.Readout = ""
Call Form1.CloseBook
End Sub
___________________________________________________________
*** Sent via Developersdex
http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!