G
Guest
Hi,
Thanks for all your help so far. I have been able to use the "On Close" for some of my required fields gather from your postings.
I work almost exclusively in Access, and the Excel Template Wizard was my only solution to getting a form filled out via email and the data to be passed automatically to Access after being approved. I need to know the code and where to put the code that will cause the approval date to auto insert in a cell when a checkbox selection is true. I can do it with a formula but the data will not update the record to my access database even if I do a range value prior to the update.
Also...
This is a Purchase Request and it has 7 rows where 7 different items can be requested, when you request an item you fill in Description, Amount, How many, Part No, etc. The problem is when they order something the Part No is required, which means I can't use the same code I used for the other required fields, because its only required when they use that line.
All of this I can do with ease in Access, but am doing some hair pulling with Excel.
Can you help, I have spent way to many hours on this already and my deadline for this project is next friday.
Below is the code I borrowed from one of you guys, it works great, thanks so much. I'm half way there.
~dawn
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Dim myrange As Range
Set myrange = Worksheets("Sheet1").Range("A1:A6,C10,D12,G1:G3")
If Application.WorksheetFunction.CountA(myrange) < _
myrange.Cells.Count Then
MsgBox "All Yellow Highlited Fields Must be Complete"
Cancel = True
End If
End Sub
Thanks for all your help so far. I have been able to use the "On Close" for some of my required fields gather from your postings.
I work almost exclusively in Access, and the Excel Template Wizard was my only solution to getting a form filled out via email and the data to be passed automatically to Access after being approved. I need to know the code and where to put the code that will cause the approval date to auto insert in a cell when a checkbox selection is true. I can do it with a formula but the data will not update the record to my access database even if I do a range value prior to the update.
Also...
This is a Purchase Request and it has 7 rows where 7 different items can be requested, when you request an item you fill in Description, Amount, How many, Part No, etc. The problem is when they order something the Part No is required, which means I can't use the same code I used for the other required fields, because its only required when they use that line.
All of this I can do with ease in Access, but am doing some hair pulling with Excel.
Can you help, I have spent way to many hours on this already and my deadline for this project is next friday.
Below is the code I borrowed from one of you guys, it works great, thanks so much. I'm half way there.
~dawn
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Dim myrange As Range
Set myrange = Worksheets("Sheet1").Range("A1:A6,C10,D12,G1:G3")
If Application.WorksheetFunction.CountA(myrange) < _
myrange.Cells.Count Then
MsgBox "All Yellow Highlited Fields Must be Complete"
Cancel = True
End If
End Sub