I have a sheet that is used as a bill of lading for shipping. It includes a button to run macros that will save, print, and clear certain cells when the required fields have been filled in. What I am trying to do is make it so that the mentioned button cannot be seen if all the required fields are not filled in. I have tried to use the code from multiple other thread on the forums and thus far I have not been able to make anything work. The closest I have been able to get is the below code, It will make the button invisible if the first cell is empty but I cant figure out how to require all cells to be filled in.
Private Sub Worksheet_Change(ByVal Target As Range)
Application.ScreenUpdating = False
If Range("B7").Value <> "" Then
Me.Shapes("CommandButton1").Visible = True
Else
Me.Shapes("CommandButton1").Visible = False
End If
End Sub
I would need cell E7, G8, and B9 to be filled in as well. One thing I have found out is that it is not an ActiveX button so the Me.Shapes is what is needed.
Private Sub Worksheet_Change(ByVal Target As Range)
Application.ScreenUpdating = False
If Range("B7").Value <> "" Then
Me.Shapes("CommandButton1").Visible = True
Else
Me.Shapes("CommandButton1").Visible = False
End If
End Sub
I would need cell E7, G8, and B9 to be filled in as well. One thing I have found out is that it is not an ActiveX button so the Me.Shapes is what is needed.