PC Review


Reply
Thread Tools Rate Thread

Command button code(SC)

 
 
Ram
Guest
Posts: n/a
 
      10th Jun 2007
Hi,

I have 4 madatory cells in my Excel sheet, and I have to design it in
such a way that if and only if these 4 cells are filled and on
clicking next button it should take us to the next page"Worksheet
name : nxt_pg". If any on the cell is Blank a msg box should appear
asking to Provide Details and on clicking OK it should activate the
cell that is left blank. All the 4 cells are named (R_nm, E-ml, Date,
Cntry).

Thanks for your help in advance

SC

 
Reply With Quote
 
 
 
 
Norman Jones
Guest
Posts: n/a
 
      10th Jun 2007
Hi Ram,

Try something like:

'=============>>
Private Sub CommandButton1_Click()
Dim Rng As Range
Dim Rng2 As Range

Set Rng = Me.Range("R_nm,Eml,Date,Cntry") '<<=== CHANGE

On Error Resume Next
Set Rng2 = Rng.SpecialCells(xlCellTypeBlanks)
On Error GoTo 0

If Not Rng2 Is Nothing Then
MsgBox Prompt:="All of the cells " _
& Rng.Address(False, False) _
& " should be completed.", _
Buttons:=vbInformation, _
Title:="Missing Data"
Rng2.Cells(1).Select
Exit Sub
End If

Me.Next.Select

End Sub
'<<=============



---
Regards,
Norman


"Ram" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi,
>
> I have 4 madatory cells in my Excel sheet, and I have to design it in
> such a way that if and only if these 4 cells are filled and on
> clicking next button it should take us to the next page"Worksheet
> name : nxt_pg". If any on the cell is Blank a msg box should appear
> asking to Provide Details and on clicking OK it should activate the
> cell that is left blank. All the 4 cells are named (R_nm, E-ml, Date,
> Cntry).
>
> Thanks for your help in advance
>
> SC
>



 
Reply With Quote
 
=?Utf-8?B?RlN0MQ==?=
Guest
Posts: n/a
 
      10th Jun 2007
hi,
there is alot of freeware to crack passwords. excel security is not that good.
http://www.cpearson.com/excel/password.htm
http://www.mcgimpsey.com/excel/fileandvbapwords.html
http://www.nirsoft.net/utils/accesspv.html

go a google. you'll find more.

Regards
FSt1
"Ram" wrote:

> Hi,
>
> I have 4 madatory cells in my Excel sheet, and I have to design it in
> such a way that if and only if these 4 cells are filled and on
> clicking next button it should take us to the next page"Worksheet
> name : nxt_pg". If any on the cell is Blank a msg box should appear
> asking to Provide Details and on clicking OK it should activate the
> cell that is left blank. All the 4 cells are named (R_nm, E-ml, Date,
> Cntry).
>
> Thanks for your help in advance
>
> SC
>
>

 
Reply With Quote
 
=?Utf-8?B?RlN0MQ==?=
Guest
Posts: n/a
 
      10th Jun 2007
opps. wrong thread
sorry
FSt1

"FSt1" wrote:

> hi,
> there is alot of freeware to crack passwords. excel security is not that good.
> http://www.cpearson.com/excel/password.htm
> http://www.mcgimpsey.com/excel/fileandvbapwords.html
> http://www.nirsoft.net/utils/accesspv.html
>
> go a google. you'll find more.
>
> Regards
> FSt1
> "Ram" wrote:
>
> > Hi,
> >
> > I have 4 madatory cells in my Excel sheet, and I have to design it in
> > such a way that if and only if these 4 cells are filled and on
> > clicking next button it should take us to the next page"Worksheet
> > name : nxt_pg". If any on the cell is Blank a msg box should appear
> > asking to Provide Details and on clicking OK it should activate the
> > cell that is left blank. All the 4 cells are named (R_nm, E-ml, Date,
> > Cntry).
> >
> > Thanks for your help in advance
> >
> > SC
> >
> >

 
Reply With Quote
 
Ram
Guest
Posts: n/a
 
      11th Jun 2007
On Jun 10, 5:29 pm, FSt1 <F...@discussions.microsoft.com> wrote:
> opps. wrong thread
> sorry
> FSt1
>
>
>
> "FSt1" wrote:
> > hi,
> > there is alot of freeware to crack passwords. excel security is not that good.
> >http://www.cpearson.com/excel/password.htm
> >http://www.mcgimpsey.com/excel/fileandvbapwords.html
> >http://www.nirsoft.net/utils/accesspv.html

>
> > go a google. you'll find more.

>
> > Regards
> > FSt1
> > "Ram" wrote:

>
> > > Hi,

>
> > > I have 4 madatory cells in my Excel sheet, and I have to design it in
> > > such a way that if and only if these 4 cells are filled and on
> > > clicking next button it should take us to the next page"Worksheet
> > > name : nxt_pg". If any on the cell is Blank a msg box should appear
> > > asking to Provide Details and on clicking OK it should activate the
> > > cell that is left blank. All the 4 cells are named (R_nm, E-ml, Date,
> > > Cntry).

>
> > > Thanks for your help in advance

>
> > > SC- Hide quoted text -

>
> - Show quoted text -


Thanks a lot this works.. But instead of cell numbers I want to
declare specific names to be displayed in the message box as this code
returns a msg box that says "All of the cells H13, H14, H15, H16
should be completed". Is it Possible.

 
Reply With Quote
 
Ram
Guest
Posts: n/a
 
      11th Jun 2007
On Jun 11, 11:05 am, Ram <sreeram....@gmail.com> wrote:
> On Jun 10, 5:29 pm, FSt1 <F...@discussions.microsoft.com> wrote:
>
>
>
>
>
> > opps. wrong thread
> > sorry
> > FSt1

>
> > "FSt1" wrote:
> > > hi,
> > > there is alot of freeware to crack passwords. excel security is not that good.
> > >http://www.cpearson.com/excel/password.htm
> > >http://www.mcgimpsey.com/excel/fileandvbapwords.html
> > >http://www.nirsoft.net/utils/accesspv.html

>
> > > go a google. you'll find more.

>
> > > Regards
> > > FSt1
> > > "Ram" wrote:

>
> > > > Hi,

>
> > > > I have 4 madatory cells in my Excel sheet, and I have to design it in
> > > > such a way that if and only if these 4 cells are filled and on
> > > > clicking next button it should take us to the next page"Worksheet
> > > > name : nxt_pg". If any on the cell is Blank a msg box should appear
> > > > asking to Provide Details and on clicking OK it should activate the
> > > > cell that is left blank. All the 4 cells are named (R_nm, E-ml, Date,
> > > > Cntry).

>
> > > > Thanks for your help in advance

>
> > > > SC- Hide quoted text -

>
> > - Show quoted text -

>
> Thanks a lot this works.. But instead of cell numbers I want to
> declare specific names to be displayed in the message box as this code
> returns a msg box that says "All of the cells H13, H14, H15, H16
> should be completed". Is it Possible.- Hide quoted text -
>
> - Show quoted text -


I have fixed the issue of getting names instead of cell address.

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
command button code dummy Microsoft Excel Misc 2 1st Dec 2009 02:57 PM
Command button code Ram Microsoft Excel Programming 2 12th Jun 2007 04:33 AM
Command button code =?Utf-8?B?cGFja3dvbGY5NA==?= Microsoft Excel Programming 3 26th Apr 2007 07:54 AM
Code for a Command Button Peter Microsoft Outlook Form Programming 1 5th Nov 2005 04:55 PM
Executing C code from a Command Button's code =?Utf-8?B?bmpj?= Microsoft Word Document Management 1 19th Apr 2004 10:38 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:45 PM.