C
Chris
I am currently using the following code to read in some
values from my VB App and place them into a preformatted
excel sheet. When my App is run by users on Win NT
machines with Office 97 it works perfectly. But when users
who are using XP Pro and Office 2000 run this code
(executed by a button); the worksheet in Excel 2000 loads
up and the values from my App are successfully transfered
but Excel has infact 'frozen' (hung/crashed etc). Does
anyone know a work around for this problem ?
Private Sub Command28_Click()
Dim ExcelSheet As Object
Set ExcelSheet = GetObject("h:\apps\ett\VRF.xlt")
ExcelSheet.Application.Visible = True
ExcelSheet.Parent.Windows(1).Visible = True
ExcelSheet.Worksheets(1).Range("e28").Value =
MakePayableTo.Text
ExcelSheet.Worksheets(1).Range("e31").Value = Address1.Text
ExcelSheet.Worksheets(1).Range("e35").Value = Address2.Text
ExcelSheet.Worksheets(1).Range("e38").Value = Address3.Text
ExcelSheet.Worksheets(1).Range("e47").Value = PostTown.Text
ExcelSheet.Worksheets(1).Range("e41").Value = Address4.Text
ExcelSheet.Worksheets(1).Range("e44").Value = Postcode.Text
Set ExcelSheet = Nothing
End Sub
values from my VB App and place them into a preformatted
excel sheet. When my App is run by users on Win NT
machines with Office 97 it works perfectly. But when users
who are using XP Pro and Office 2000 run this code
(executed by a button); the worksheet in Excel 2000 loads
up and the values from my App are successfully transfered
but Excel has infact 'frozen' (hung/crashed etc). Does
anyone know a work around for this problem ?
Private Sub Command28_Click()
Dim ExcelSheet As Object
Set ExcelSheet = GetObject("h:\apps\ett\VRF.xlt")
ExcelSheet.Application.Visible = True
ExcelSheet.Parent.Windows(1).Visible = True
ExcelSheet.Worksheets(1).Range("e28").Value =
MakePayableTo.Text
ExcelSheet.Worksheets(1).Range("e31").Value = Address1.Text
ExcelSheet.Worksheets(1).Range("e35").Value = Address2.Text
ExcelSheet.Worksheets(1).Range("e38").Value = Address3.Text
ExcelSheet.Worksheets(1).Range("e47").Value = PostTown.Text
ExcelSheet.Worksheets(1).Range("e41").Value = Address4.Text
ExcelSheet.Worksheets(1).Range("e44").Value = Postcode.Text
Set ExcelSheet = Nothing
End Sub