LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
Sal Sal is offline
external usenet poster
 
Posts: 84
Default Excel &VB - If/ElseIf - how to allow editing if no variables apply

Hello All! I am a struggling new user and probably not even close in the
proper way to use VB, so my apologies if my question makes you cringe!
Here's what I have:

Cell AH68 is connected to 3 radio buttons, which means AH68 will display a
"0" if no buttons are selected
"1" , "2", or "3" depending on which button is selected.

The EXCEL Side:
If AH68 = "0" or "1", a message appears in another cell (W66) stating "This
information is required"; otherwise, if AH68 = "2" or "3", W66 states "N/A".

MY GOAL:
Since the date the sheet is closed is a catalyst for money to be collected,
I have a cell (E74) which is the 'Date Closed' field. If W66 is blank or
shows "This information is required", I want the Date Closed field (E74) to
show "Required Information Missing" and NOT allow editing. If W66 has any
other data in it, I want E74 to be editable.

Below is what I came up with - the last line (before End If) is where I
think I'm stuck. If anyone can help, I'd be very grateful! Thanks!

Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)

If Range("AH68").Value = "1" And Range("W66") = "This Information Is
Required" Or Range("AH68").Value = "0" And Range("W66") = "This Information
Is Required" Then
Range("E74") = "Required Information Missing"

ElseIf Range("AH68").Value "1" And Range("W66") < "This Information
Is Required" Then
Range("E74") = ??? I need it to be editable - this is where I'm stuck.

End If

End Sub

 
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
How many conditions can I apply to a cell? I need to apply 8. Markus Excel Discussion (Misc queries) 2 July 10th 08 01:06 PM
elseif Tom Ogilvy Excel Programming 3 March 28th 07 03:03 AM
elseif Curt Excel Programming 0 March 28th 07 01:13 AM
if then elseif on text file imported into excel mike windbigler Excel Programming 1 July 26th 04 11:48 AM
If...Elseif...End If javab98 Excel Programming 2 July 19th 04 07:23 PM


All times are GMT +1. The time now is 06:45 AM.

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

About Us

"It's about Microsoft Excel"