unable to access form

I heart Excel

Board Regular
Joined
Feb 28, 2011
Messages
66
Hello,

I have completed a form that has taken me a while to do now, and one of our users, who will need to access the form can't.

They get numerous errors in the VBA Part.

The automatic date script for todays date errors as does the hidden cells UCase error.

Here is the script I have on the Sheet -

Private Sub Worksheet_Change(ByVal Target As Range)

Select Case Target.Address

Case "$D$14"
If UCase(Target.Value) = "NO" Then
Rows("22:25").EntireRow.Hidden = True
Rows("17:19").EntireRow.Hidden = False
ElseIf UCase(Target.Value) = "YES" Then
Rows("22:25").EntireRow.Hidden = False
Rows("17:20").EntireRow.Hidden = True
End If

Case "$G$14"
If UCase(Target.Value) = "NO" Then
Rows("27:58").EntireRow.Hidden = True
ElseIf UCase(Target.Value) = "YES" Then
Rows("27:35").EntireRow.Hidden = False
Rows("36:58").EntireRow.Hidden = True
End If

Case "$D$30"
If UCase(Target.Value) = "NO" Then
Rows("38:41").EntireRow.Hidden = True
Rows("33:35").EntireRow.Hidden = False
ElseIf UCase(Target.Value) = "YES" Then
Rows("38:41").EntireRow.Hidden = False
Rows("33:36").EntireRow.Hidden = True
End If

Case "$G$30"
If UCase(Target.Value) = "NO" Then
Rows("43:58").EntireRow.Hidden = True
ElseIf UCase(Target.Value) = "YES" Then
Rows("43:51").EntireRow.Hidden = False
Rows("52:58").EntireRow.Hidden = True
End If

Case "$D$46"
If UCase(Target.Value) = "NO" Then
Rows("54:57").EntireRow.Hidden = True
Rows("49:51").EntireRow.Hidden = False
ElseIf UCase(Target.Value) = "YES" Then
Rows("54:58").EntireRow.Hidden = False
Rows("49:52").EntireRow.Hidden = True
End If

Case "$E$19"
If UCase(Target.Value) = "YES" Then
Rows("17").EntireRow.Hidden = True
Rows("20").EntireRow.Hidden = False
ElseIf UCase(Target.Value) = "NO" Then
Rows("17").EntireRow.Hidden = False
Rows("20").EntireRow.Hidden = True
End If

Case "$E$35"
If UCase(Target.Value) = "YES" Then
Rows("33").EntireRow.Hidden = True
Rows("36").EntireRow.Hidden = False
ElseIf UCase(Target.Value) = "NO" Then
Rows("33").EntireRow.Hidden = False
Rows("36").EntireRow.Hidden = True
End If

Case "$E$51"
If UCase(Target.Value) = "YES" Then
Rows("49").EntireRow.Hidden = True
Rows("52").EntireRow.Hidden = False
ElseIf UCase(Target.Value) = "NO" Then
Rows("49").EntireRow.Hidden = False
Rows("52").EntireRow.Hidden = True
End If


Case Else
Exit Sub
End Select
End Sub


And here is the script on the opening of the worksheet -

Private Sub Workbook_Open()
Dim objOLE As Object
For Each objOLE In Sheets("Annual Leave Form").OLEObjects
If TypeName(objOLE.Object) = "DTPicker" Then
objOLE.Object.Value = Date
End If
Next objOLE


End Sub


Any ideas what is going wrong, other users can access the form and work it from there PC's, but not from this one?! I have checked the settings and MAcros are enabled, etc

Any help would be very grateful, thanks


 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
Ask your user to activate the Visual Basic Editor (Alt+F11), click the workbook in the Project window, choose Tools|References from the menu and uncheck any references that are marked as MISSING.
 
Upvote 0

Forum statistics

Threads
1,224,547
Messages
6,179,436
Members
452,915
Latest member
hannnahheileen

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top