ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Losing Data (https://www.excelbanter.com/excel-discussion-misc-queries/175122-losing-data.html)

Jenny B.

Losing Data
 
Good Afternoon,

I've used the same code below in several of my previous workbooks. I use it
to enforce entry into a worksheet related cell and make sure it's completed
before proceeding. This particular instance is housed with a larger macro,
but it's acting different than past applications.

The person using this worksheet enters data and then presses a custom send
button. This message pops up if M20 is not completed. In past workbooks, the
code simply halts and they just enter the data to satisfy the request and
press send again. This is not the case with this use. It's stopping, but
deleting their data.

Is there a simple command I could use to request Clear contents = False - or
something of that nature so it exists sub, but doesn't take their data with
it?

Thanks - Jenny B.

If ActiveSheet.Range("m20") = "" Then
MsgBox "Please Review Legal Name and Document in Comments."
Exit sub
End If

Dave Peterson

Losing Data
 
There's nothing in your posted code that makes it do what you describe.



Jenny B. wrote:

Good Afternoon,

I've used the same code below in several of my previous workbooks. I use it
to enforce entry into a worksheet related cell and make sure it's completed
before proceeding. This particular instance is housed with a larger macro,
but it's acting different than past applications.

The person using this worksheet enters data and then presses a custom send
button. This message pops up if M20 is not completed. In past workbooks, the
code simply halts and they just enter the data to satisfy the request and
press send again. This is not the case with this use. It's stopping, but
deleting their data.

Is there a simple command I could use to request Clear contents = False - or
something of that nature so it exists sub, but doesn't take their data with
it?

Thanks - Jenny B.

If ActiveSheet.Range("m20") = "" Then
MsgBox "Please Review Legal Name and Document in Comments."
Exit sub
End If


--

Dave Peterson

Jenny B.

Losing Data
 
I think I answered my own question right after sent this out. This is called
during a routine and since it can't proceed ruther after teh error comes up -
this routie termitnates, but the next in line runs. The next one just happens
to be a Clear Routine so I think that answers my own question.

Case solved, but thanks so much for taking the tiem to reply - Jenny B.

"Dave Peterson" wrote:

There's nothing in your posted code that makes it do what you describe.



Jenny B. wrote:

Good Afternoon,

I've used the same code below in several of my previous workbooks. I use it
to enforce entry into a worksheet related cell and make sure it's completed
before proceeding. This particular instance is housed with a larger macro,
but it's acting different than past applications.

The person using this worksheet enters data and then presses a custom send
button. This message pops up if M20 is not completed. In past workbooks, the
code simply halts and they just enter the data to satisfy the request and
press send again. This is not the case with this use. It's stopping, but
deleting their data.

Is there a simple command I could use to request Clear contents = False - or
something of that nature so it exists sub, but doesn't take their data with
it?

Thanks - Jenny B.

If ActiveSheet.Range("m20") = "" Then
MsgBox "Please Review Legal Name and Document in Comments."
Exit sub
End If


--

Dave Peterson



All times are GMT +1. The time now is 05:42 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com