Space_Maniak
New Member
- Joined
- Nov 13, 2020
- Messages
- 4
- Office Version
- 365
- Platform
- Windows
Good afternoon,
I would like to ask you guys for a help. I am using Application Intersect with Select Case to enable dynamic hiding of selected rows based of inserted value to certain field (the point is to make formular as small as possible for tje user). The code looks like this. I repeat this part for tens of fields (i am a beginner so didnt know how else to do it).
Problem is that i need to pull data from other sheet but it ll error and stop the macro above. I am using simple fomulation like this:
But after the value is transfered i've got this message:
Does anybody know what the problem is and how to solve it?
Thanks in advance!
I would like to ask you guys for a help. I am using Application Intersect with Select Case to enable dynamic hiding of selected rows based of inserted value to certain field (the point is to make formular as small as possible for tje user). The code looks like this. I repeat this part for tens of fields (i am a beginner so didnt know how else to do it).
VBA Code:
Private Sub Worksheet_Change(ByVal Target As Range)
ActiveSheet.Activate
If Not Application.Intersect(Range("C46"), Range(Target.Address)) Is Nothing Then
Select Case Target.Value
Case Is = "ANO"
Rows("47:49").EntireRow.Hidden = False
Case Is = "NE"
Rows("47:49").EntireRow.Hidden = True
Range("C47:C49") = ""
Case Is = ""
Rows("47:49").EntireRow.Hidden = True
End Select
End If
End Sub
Problem is that i need to pull data from other sheet but it ll error and stop the macro above. I am using simple fomulation like this:
VBA Code:
Sub odemčení()
pass = InputBox("Zadejte heslo:")
ThisWorkbook.Unprotect pass
Worksheets("Formulář_klient").Range("C18:C25").Value = Worksheets("Formulář").Range("C39:C46").Value
End Sub
But after the value is transfered i've got this message:
Does anybody know what the problem is and how to solve it?
Thanks in advance!