Harlequin007
Technical User
Morning Everyone
I have an Excel workbook and one of the worksheets gives the user a button which when pressed should display a dialog box prompting them to ensure they have correctly located their cursor. If they select Yes - it should execute the code to insert a group of pre-formatted cells. If No, just exit the sub.
Here's what I have:
Problem:
Whether I select "Yes" or "No" the code exits.
I'm confused and wiery - been trying to sort this all morning. I know it's something simple I am overlooking but 2 heads are better than 1.
----------------------------
Cogito Ergo Sum![[jester2] [jester2] [jester2]](/data/assets/smilies/jester2.gif)
----------------------------
I have an Excel workbook and one of the worksheets gives the user a button which when pressed should display a dialog box prompting them to ensure they have correctly located their cursor. If they select Yes - it should execute the code to insert a group of pre-formatted cells. If No, just exit the sub.
Here's what I have:
Dim Response As Integer
MsgBox ("Have You Selected a Cell in Column A and below Row 77"), vbYesNo, ("DVW Workbook")
If Response = vbYes Then
GoTo Insert_Header
Else
MsgBox ("Please Place Your Cursor In Column 'A' and Continue"), vbOKOnly, ("DVW Workbook")
GoTo Bottom
End If
Insert_Header:
My code goes here
Problem:
Whether I select "Yes" or "No" the code exits.
Bottom:
End Sub
I'm confused and wiery - been trying to sort this all morning. I know it's something simple I am overlooking but 2 heads are better than 1.
----------------------------
Cogito Ergo Sum
![[jester2] [jester2] [jester2]](/data/assets/smilies/jester2.gif)
----------------------------