Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Run-time error '11' & Run-time error '1004'

I have a drop down combobox((name)=AL_MLP) over and linked to cell D:24 with
options of "yes"/"no"/"n/a" to answer a question and if the answer is "no"
or "n/a" i have tried to hide the next question using the following code
(the next question is populated by a similar combobox over and linked to
cell d:25)

Private Sub AL_MLP_Change()
VarCurrentString = AL.AL_MLP.Value
If VarCurrentString = "Yes" Then
AL.Rows("25:25").Select
Selection.EntireRow.Hidden = False
End
End If
VarCurrentString = AL.AL_MLP.Value
If VarCurrentString = "No" Then
AL.Rows("25:25").Select
Selection.EntireRow.Hidden = True
End
End If
VarCurrentString = AL.AL_MLP.Value
If VarCurrentString = "N/A" Then
AL.Rows("25:25").Select
Selection.EntireRow.Hidden = True
End
End If
VarCurrentString = AL.AL_MLP.Value
If VarCurrentString = "" Then
AL.Rows("25:25").Select
Selection.EntireRow.Hidden = False
End
End If

End Sub

this works but the problem is if someone has already skipped forward to the
next question and filled it in then when the user trys to select "no" or
"n/a" the following errors occur

run-time error 11 division by zero

if i ignore this and try again i get

run-time error 1004 unable to set Hidden property of the range class

anybody know how i can fix this as I'm pretty stuck!!!
thanks
piers





Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
run time error 1004 Louise Excel Discussion (Misc queries) 1 January 18th 07 11:11 PM
run time error 1004 johnw Excel Discussion (Misc queries) 0 November 16th 05 11:56 AM
Run time error 1004, General ODBC error [email protected] New Users to Excel 0 September 19th 05 01:41 AM
Run-time error '11' & Run-time error '1004' Piers Clinton-Tarestad Excel Programming 0 January 9th 04 08:35 PM
Run time error 1004 Eric[_14_] Excel Programming 0 December 3rd 03 12:41 AM


All times are GMT +1. The time now is 09:01 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"