Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Peter Green
 
Posts: n/a
Default Can I make cell completion mandatory in excel?

Excel 2000
  #2   Report Post  
Jason Morin
 
Posts: n/a
Default

You can set up your workbook so that it will not allow
the user to close the workbook without filling in certain
cell. For example:

Private Sub Workbook_BeforeClose(Cancel As Boolean)
Dim checkRng As Range
Set checkRng = Sheets("Sheet1").Range("A1")
If checkRng.Value = "" Then
Cancel = True
MsgBox "Please fill in " & _
checkRng.Address(False, False) & "."
End If
End Sub

---
Place this in the ThisWorkbook module of your workbook.

HTH
Jason
Atlanta, GA



-----Original Message-----
Excel 2000
.

  #3   Report Post  
Dave Peterson
 
Posts: n/a
Default

Just a thought...

Maybe this would be better in the _beforeSave event.

Then the user can open and close without having to fill in A1.

And with the _beforeclose event, I can save with A1 empty, fill in A1, close
(without saving).



Jason Morin wrote:

You can set up your workbook so that it will not allow
the user to close the workbook without filling in certain
cell. For example:

Private Sub Workbook_BeforeClose(Cancel As Boolean)
Dim checkRng As Range
Set checkRng = Sheets("Sheet1").Range("A1")
If checkRng.Value = "" Then
Cancel = True
MsgBox "Please fill in " & _
checkRng.Address(False, False) & "."
End If
End Sub

---
Place this in the ThisWorkbook module of your workbook.

HTH
Jason
Atlanta, GA

-----Original Message-----
Excel 2000
.


--

Dave Peterson
  #4   Report Post  
Jason Morin
 
Posts: n/a
Default

Yes, I wasn't sure which event made more sense. I suppose
if I had tested them both I would have reached the same
conclusions.

-----Original Message-----
Just a thought...

Maybe this would be better in the _beforeSave event.

Then the user can open and close without having to fill

in A1.

And with the _beforeclose event, I can save with A1

empty, fill in A1, close
(without saving).



Jason Morin wrote:

You can set up your workbook so that it will not allow
the user to close the workbook without filling in

certain
cell. For example:

Private Sub Workbook_BeforeClose(Cancel As Boolean)
Dim checkRng As Range
Set checkRng = Sheets("Sheet1").Range("A1")
If checkRng.Value = "" Then
Cancel = True
MsgBox "Please fill in " & _
checkRng.Address(False, False) & "."
End If
End Sub

---
Place this in the ThisWorkbook module of your workbook.

HTH
Jason
Atlanta, GA

-----Original Message-----
Excel 2000
.


--

Dave Peterson
.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
make a cell empty based on condition mpierre Charts and Charting in Excel 2 December 29th 04 01:01 PM
Copy Word table into Excel cell by cell hg Excel Discussion (Misc queries) 3 December 15th 04 04:43 PM
Using Jet to read excel file returns blank for last cell - sometim Ron Excel Discussion (Misc queries) 1 December 9th 04 08:21 AM
Paste rows of numbers from Word into single Excel cell BecG Excel Discussion (Misc queries) 1 December 8th 04 04:55 PM
how do i set up a single cell continual entry in excel to total f. mike@swallow Excel Discussion (Misc queries) 1 December 7th 04 12:29 PM


All times are GMT +1. The time now is 09:00 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"