I am using VBA to enforce the population of two cells in my worksheet. I check to see if there are values in the on_save event. If there is not a value I prompt for it with the following code:
If Len(Range("M2").Value) = 0 Then
myValue = InputBox("Please enter your valid Email address")
Range("M2").Value = myValue
End If
If Len(Range("N2").Value) = 0 Then
myValue = InputBox("Enter Y/N?")
Range("N2").Value = myValue
End If
This seems to work for populating the cells. The values appear in the cells even when the file is closed and re-opened.
HOWEVER if I try to import the data via SQL. These fields appear blank.
But if I open the file, they have values.
Has anyone ever experienced this before?
If Len(Range("M2").Value) = 0 Then
myValue = InputBox("Please enter your valid Email address")
Range("M2").Value = myValue
End If
If Len(Range("N2").Value) = 0 Then
myValue = InputBox("Enter Y/N?")
Range("N2").Value = myValue
End If
This seems to work for populating the cells. The values appear in the cells even when the file is closed and re-opened.
HOWEVER if I try to import the data via SQL. These fields appear blank.
But if I open the file, they have values.
Has anyone ever experienced this before?