Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 577
Default Requiring Cell Input

Hello,

I have a spreadsheet that I use as a form. I'd like to make a madatory field
that requires input in cell A1. Any ideas on how to require input?

I have one idea to say "when user tries to save, if cell A1 is empty, show a
message box that states 'Input required in cell A1.' "

I'm open to other ideas too. The easier the solution the better as I'm not a
VBA programmer.

Scott
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,124
Default Requiring Cell Input

Try this in the ThisWorkbook module

Private Sub Workbook_BeforeSave _
(ByVal SaveAsUI As Boolean, Cancel As Boolean)
Set magiccell = Sheets("sheet2").Range("a1")
If Len(Application.Trim(magiccell)) < 1 Then
Application.Goto magiccell
MsgBox "Fill in required cell"
Cancel = True
End If
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Scott" wrote in message
...
Hello,

I have a spreadsheet that I use as a form. I'd like to make a madatory
field
that requires input in cell A1. Any ideas on how to require input?

I have one idea to say "when user tries to save, if cell A1 is empty, show
a
message box that states 'Input required in cell A1.' "

I'm open to other ideas too. The easier the solution the better as I'm not
a
VBA programmer.

Scott


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,124
Default Requiring Cell Input

Try this in the ThisWorkbook module

Private Sub Workbook_BeforeSave _
(ByVal SaveAsUI As Boolean, Cancel As Boolean)
Set magiccell = Sheets("sheet2").Range("a1")
If Len(Application.Trim(magiccell)) < 1 Then
Application.Goto magiccell
MsgBox "Fill in required cell"
Cancel = True
End If
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Scott" wrote in message
...
Hello,

I have a spreadsheet that I use as a form. I'd like to make a madatory
field
that requires input in cell A1. Any ideas on how to require input?

I have one idea to say "when user tries to save, if cell A1 is empty, show
a
message box that states 'Input required in cell A1.' "

I'm open to other ideas too. The easier the solution the better as I'm not
a
VBA programmer.

Scott


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
Requiring a value in a cell before allowing user to print GainesvilleWes via OfficeKB.com Excel Programming 5 December 4th 08 01:06 PM
Requiring Cell Content on Save The Chad Excel Discussion (Misc queries) 1 July 3rd 08 12:06 AM
Requiring "Explanation" when changing number in cell Adam Ronalds[_2_] Excel Programming 0 June 23rd 08 07:21 PM
MsgBox or like it for with requiring user input Nils Titley Excel Programming 6 March 20th 08 02:22 AM
Fields requiring input amaries Excel Programming 0 March 28th 07 01:59 AM


All times are GMT +1. The time now is 08:06 PM.

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

About Us

"It's about Microsoft Excel"