Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 72
Default VBA Code Help

I have a user form that contains a check box. When the check Box Yes
selection is made, a MsgBox appears providing the user some information.

Is it possible upon the "OK" being clicked in that message box to take the
user to a defined cell? My MsgBox is telling the user they need to enter
data in, say cell B1. I would like to have cell B1 be the active cell after
the OK is clicked in the MsgBox.

Any ideas?

Thanks!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,939
Default VBA Code Help

You bet... The only trick is that your form can not be Modal. Change the
ShowModal property of the form to false (or when you show the form
Userform1.Show False). Now you can get off of the form and onto the sheet.

msgbox "Some Description", vbOkOnly
with sheets("Sheet1")
.Select
.Range("A1").Select
end with

The form will still be shown throughout this process...
--
HTH...

Jim Thomlinson


"TimN" wrote:

I have a user form that contains a check box. When the check Box Yes
selection is made, a MsgBox appears providing the user some information.

Is it possible upon the "OK" being clicked in that message box to take the
user to a defined cell? My MsgBox is telling the user they need to enter
data in, say cell B1. I would like to have cell B1 be the active cell after
the OK is clicked in the MsgBox.

Any ideas?

Thanks!

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 72
Default VBA Code Help

Thanks Jim. That is exactly what I was after!

"Jim Thomlinson" wrote:

You bet... The only trick is that your form can not be Modal. Change the
ShowModal property of the form to false (or when you show the form
Userform1.Show False). Now you can get off of the form and onto the sheet.

msgbox "Some Description", vbOkOnly
with sheets("Sheet1")
.Select
.Range("A1").Select
end with

The form will still be shown throughout this process...
--
HTH...

Jim Thomlinson


"TimN" wrote:

I have a user form that contains a check box. When the check Box Yes
selection is made, a MsgBox appears providing the user some information.

Is it possible upon the "OK" being clicked in that message box to take the
user to a defined cell? My MsgBox is telling the user they need to enter
data in, say cell B1. I would like to have cell B1 be the active cell after
the OK is clicked in the MsgBox.

Any ideas?

Thanks!

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
split post code (zip code) out of cell that includes full address Concord Excel Discussion (Misc queries) 4 October 15th 09 06:59 PM
Drop Down/List w/Code and Definition, only code entered when selec Spiritdancer Excel Worksheet Functions 2 November 2nd 07 03:57 AM
Create a newworksheet with VBA code and put VBA code in the new worksheet module ceshelman Excel Programming 4 June 15th 05 04:37 PM
stubborn Excel crash when editing code with code, one solution Brian Murphy Excel Programming 0 February 20th 05 05:56 AM
VBA code delete code but ask for password and unlock VBA protection WashoeJeff Excel Programming 0 January 27th 04 07:07 AM


All times are GMT +1. The time now is 09:42 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"