Hi Gurus
Firstly I would like to say... I know nothing about programming or VBA. I'm actually a geologist who has given up playing with rocks to earn some real money! Hahahaha. Anyway...
I have written most of what we need, the problem I am facing is getting it to save the data. I have 7 forms, the first starts with name date etc. I would like to be able to save the worksheet at the end of the first form and have it open it on the second.
I did have it saving the worksheet, however, something went t~ts up and now it won't and I cannot get the code to work.
The top of the form is set as
[VBA]
Private Sub command1_Click()
Dim oExcel As Object
Dim oBook As Object
Dim oExcelSheet As Object
Dim counter As Integer
'Start a new workbook in Excel
Set oExcelSheet = CreateObject("Excel.Application")
Set oBook = oExcel.Workbooks.add
'Add data to cells of the first worksheet in the new workbook
Set oSheet = oBook.Worksheets(1)
oSheet.Range("A1").Value = "name"
oSheet.Range("B1").Value = "name1"
oSheet.Range("A2").Value = "company"
oSheet.Range("B2").Value = "com"
[/VBA]
Then to save we have....
[VBA]
Excelsheet.SaveAs FileName:="d:\testy.xls"
[/VBA]
I then need to be able to open it up in the second form, which i have no idea about.
Could someone help me out? Please!
Cheers for looking anyway!!!