In sheet 'Booking' A36 I usually enter a contact Name In sheet 'Booking' A38 I will…
- User
In sheet 'Booking' A36 I usually enter a contact Name In sheet 'Booking' A38 I will enter an Email address In sheet 'Contacts' column A are stored contact names In sheet 'Contacts' column B are stored email addresses Each of the rows that makes up column A and B is a contact name and the email address for that name
Can I have a module that will go the following.
check that the email address entered in sheet 'Booking' A38 does not exist in sheet 'Contacts' column B If it does exist pop up a message 'Contact Email Already Exists' clear the values in 'Booking' A36 and A38 and exit the sub. If the email does not exist, copy the values of 'Booking' A36 and A38 to next available row in sheet 'Contact' A36 in into column A and A38 into column B of the same row in sheet 'Contact' then pop up a message 'Contact details recorded' then clear the values in 'Booking' A36 and A38.
- Assistant
- User
Please can you add the following conditions to the code. If A36 is blank, pop message "Name not entered" and exit sub. If A38 is blank "Email not entered" and exit sub
- Assistant
Sure! You can add the input validation checks for the contact name and email as you requested. Below is the modified VBA code that includes checks for empty values in cells and . If either cell is blank, the respective message will be displayed, and the subroutine will exit.
- User
The following VBA works great. Within the VBA there is a function that creates a blank row within my calender rows. Can you please remove this blank row: Sub CreateCalendar() Application.EnableEvents = False Dim ws As Worksheet Dim currDate As Date Dim rowNum As Integer Dim colNum As Integer Dim monthCounter As Integer
code - Assistant