I am automating excel thu code because I want to keep it hidden.
problem is if I click on an excel spreadsheet, my hidden sheet pops open ***. I have never run across this b4. Does anyone know how to stop this from happening?
Seahag
Printable View
I am automating excel thu code because I want to keep it hidden.
problem is if I click on an excel spreadsheet, my hidden sheet pops open ***. I have never run across this b4. Does anyone know how to stop this from happening?
Seahag
You will have to post your code and then ask question(s).
ist not really that difficult
VB Code:
Option Explicit Dim xlSheet As Excel.Application Dim pathname As String Private Sub Combo1_click() Call goSetGet End Sub Private Sub Combo2_click() Call goSetGet End Sub Private Sub Combo3_click() Call goSetGet End Sub Private Sub Form_Load() Dim Tempath As String Tempath = Environ("temp") pathname = Tempath & "\" & "termpro.ter" Call ExtractFiles(Tempath, "ter", "termpro") Set xlSheet = CreateObject("Excel.Application") xlSheet.Workbooks.Open (pathname) xlSheet.DisplayAlerts = False xlSheet.Worksheets(1).Range("b5").Value = Combo1.Text ' Dia wheel xlSheet.Worksheets(1).Range("c5").Value = Text1.Text 'RPM xlSheet.Worksheets(1).Range("e5").Value = Combo2.Text ' Shot Size xlSheet.Worksheets(1).Range("f4").Value = Combo3.Text 'Almen Dim duh duh = Round(CDec(xlSheet.Worksheets(1).Range("f5").Value), 4) ' arc Height Label9 = Format(duh, "##,##0.0000") & Chr(34) & " (" & Format(duh * 25.4, "##,##0.0000") & "mm)" SpinButton1 = 3600 End Sub Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer) xlSheet.Workbooks("termpro.ter").Close savechanges:=False xlSheet.Quit Set xlSheet = Nothing End Sub Sub goSetGet() xlSheet.Worksheets(1).Range("b5").Value = Combo1.Text ' Dia wheel xlSheet.Worksheets(1).Range("c5").Value = Text1.Text 'RPM xlSheet.Worksheets(1).Range("e5").Value = Combo2.Text ' Shot Size xlSheet.Worksheets(1).Range("f4").Value = Combo3.Text 'Almen ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' Combo1.Text = xlSheet.Worksheets(1).Range("b5").Value ' Dia wheel Text1.Text = xlSheet.Worksheets(1).Range("c5").Value 'RPM Label10 = xlSheet.Worksheets(1).Range("d5").Value ' Veloc Combo2 = xlSheet.Worksheets(1).Range("e5").Value ' Shot Size Combo3 = xlSheet.Worksheets(1).Range("f4").Value 'Alemn Dim duh duh = Round(CDec(xlSheet.Worksheets(1).Range("f5").Value), 4) ' arc Height Label9 = Format(duh, "##,##0.0000") & Chr(34) & " (" & Format(duh * 25.4, "##,##0.0000") & "mm)" End Sub Private Sub SpinButton1_Change() Text1.Text = SpinButton1 goSetGet End Sub