Przemyslav
New Member
- Joined
- Oct 21, 2010
- Messages
- 3
Hi everybody
Nice to meet you. I need some help with VBA.
I have worksheet, like this:
http://radikal.ru/F/s15.radikal.ru/i189/1010/13/515dfb403dc3.jpg.html
I have day-list. When i choose a day from this list, Excel should take me to another cell. This cell is ilustrated on third picture - column AK.
http://radikal.ru/F/s59.radikal.ru/i165/1010/44/b4327d7e331f.jpg.html
http://radikal.ru/F/i061.radikal.ru/1010/e6/cfa83e23a719.jpg.html
But when I choose day on list I have this error:
Object variable not set (Error 91)
When I click Debug button Escel shows me, that this line is wrong in VBA:
This is my all code for this function:
What I do wrong ??
P.S. My sheets have to be protect in Excel.
Thanks for any help.

I have worksheet, like this:
http://radikal.ru/F/s15.radikal.ru/i189/1010/13/515dfb403dc3.jpg.html
I have day-list. When i choose a day from this list, Excel should take me to another cell. This cell is ilustrated on third picture - column AK.
http://radikal.ru/F/s59.radikal.ru/i165/1010/44/b4327d7e331f.jpg.html
http://radikal.ru/F/i061.radikal.ru/1010/e6/cfa83e23a719.jpg.html
But when I choose day on list I have this error:
Object variable not set (Error 91)
When I click Debug button Escel shows me, that this line is wrong in VBA:
Code:
Columns("AK").Find(what:=Target.Value, Lookat:=xlWhole).Select
This is my all code for this function:
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Count = 1 Then
If Target = Range("C1") Then
Columns("AK").Find(what:=Target.Value, Lookat:=xlWhole).Select
End If
End If
End Sub
What I do wrong ??
P.S. My sheets have to be protect in Excel.
Thanks for any help.
Last edited: