Hi,
I'm relatively new to Excel macros, and have been developing a test procedure for our manufacturing folks to use when testing new equipment. They are using a Panasonic Toughbook tablet PC. I have developed a worksheet which contains the steps for the test procedure. After filling in all the info. and checking the checkboxes as each step passes testing, I have a button for them to click which renames the current worksheet with the test id and saves the workbook. The next time they want to test, they open the workbook, and click another button which copies the worksheet and renames the new worksheet "NewTest", clears out the checkboxes and data fields, and resets the date and time to current. We are using Excel 2010 on both my development computer and the Toughbook tablet.
I have everything working fine on my computer, but the Toughbook tablet will not execute any statement containing a reference to the ActiveSheet or Worksheet. Here's my code:
Sub Copy_Sheet()
ActiveSheet.Copy After:=ActiveSheet
ActiveSheet.Name = "NewTest"
Call CheckBoxesFalse
Call ClearContents
Call DatePicker
End Sub
Sub CheckBoxesFalse()
Dim objsheet As Worksheet
Dim objShapes As Shape
Set objsheet = ActiveSheet
For Each objShapes In objsheet.Shapes
If objShapes.Type = msoFormControl Then
If objShapes.FormControlType = xlCheckBox Then
objShapes.ControlFormat = False
End If
End If
Next objShapes
End Sub
Sub ClearContents()
ActiveSheet.Range("b3,c5,f5,c7,f7,c9,f9,b11,c63,b65,b66,b68").Select
Selection.ClearContents
End Sub
Sub DatePicker()
ActiveSheet.DTPicker21.Value = Date
ActiveSheet.DTPicker22.Value = Date
ActiveSheet.DTPicker23.Value = Time
ActiveSheet.DTPicker24.Value = Time
ActiveSheet.DTPicker25.Value = Date
End Sub
I have put alot of time into reading the forums and looking for answers, but no luck so far. I would greatly
appreciate any help on this. I have a feeling it's something really simple, I just don't know enough about
it all to see it.
Thanks,
Sue
I'm relatively new to Excel macros, and have been developing a test procedure for our manufacturing folks to use when testing new equipment. They are using a Panasonic Toughbook tablet PC. I have developed a worksheet which contains the steps for the test procedure. After filling in all the info. and checking the checkboxes as each step passes testing, I have a button for them to click which renames the current worksheet with the test id and saves the workbook. The next time they want to test, they open the workbook, and click another button which copies the worksheet and renames the new worksheet "NewTest", clears out the checkboxes and data fields, and resets the date and time to current. We are using Excel 2010 on both my development computer and the Toughbook tablet.
I have everything working fine on my computer, but the Toughbook tablet will not execute any statement containing a reference to the ActiveSheet or Worksheet. Here's my code:
Sub Copy_Sheet()
ActiveSheet.Copy After:=ActiveSheet
ActiveSheet.Name = "NewTest"
Call CheckBoxesFalse
Call ClearContents
Call DatePicker
End Sub
Sub CheckBoxesFalse()
Dim objsheet As Worksheet
Dim objShapes As Shape
Set objsheet = ActiveSheet
For Each objShapes In objsheet.Shapes
If objShapes.Type = msoFormControl Then
If objShapes.FormControlType = xlCheckBox Then
objShapes.ControlFormat = False
End If
End If
Next objShapes
End Sub
Sub ClearContents()
ActiveSheet.Range("b3,c5,f5,c7,f7,c9,f9,b11,c63,b65,b66,b68").Select
Selection.ClearContents
End Sub
Sub DatePicker()
ActiveSheet.DTPicker21.Value = Date
ActiveSheet.DTPicker22.Value = Date
ActiveSheet.DTPicker23.Value = Time
ActiveSheet.DTPicker24.Value = Time
ActiveSheet.DTPicker25.Value = Date
End Sub
I have put alot of time into reading the forums and looking for answers, but no luck so far. I would greatly
appreciate any help on this. I have a feeling it's something really simple, I just don't know enough about
it all to see it.
Thanks,
Sue