#1   Report Post  
DME
 
Posts: n/a
Default Macro Help

I need to run a Macro(set up a command button) that will take me to the next
open box in a specific column. For instance if I have data in Cells C5 to
C11. I want to run a macro to select cell C12.

I have tried but not being very successful.

I currently have a macro that is setup to run a macro from the cell I am on
(user has to select C12 currently). I want to be able the user to just run
the macro by pressing the command button rather than having to going to cell
c12 then running the macro. In essence, make the process dummy proof. I
have users currently who cannot seem to select the next open cell in the
correct column.

My boss thinks this is impossible, but I told him all I have to do is post
the question out here. This group has made me look like a genius on more
than one ocassion. Thanks!




  #2   Report Post  
CLR
 
Posts: n/a
Default

Sub SelectNextCell()
'assumes data starting in C5, will take cursor to bottom of data and
step
'down to next blank cell
Application.Goto Reference:="R5C3"
Selection.End(xlDown).Select
Selection.Offset(1, 0).Select
End Sub

Vaya con Dios,
Chuck, CABGx3


"DME" <craigjoseathotmaildotcom wrote in message
...
I need to run a Macro(set up a command button) that will take me to the

next
open box in a specific column. For instance if I have data in Cells C5 to
C11. I want to run a macro to select cell C12.

I have tried but not being very successful.

I currently have a macro that is setup to run a macro from the cell I am

on
(user has to select C12 currently). I want to be able the user to just

run
the macro by pressing the command button rather than having to going to

cell
c12 then running the macro. In essence, make the process dummy proof. I
have users currently who cannot seem to select the next open cell in the
correct column.

My boss thinks this is impossible, but I told him all I have to do is post
the question out here. This group has made me look like a genius on more
than one ocassion. Thanks!






  #3   Report Post  
Ken Hudson
 
Posts: n/a
Default

Hi DME,
To set up a command button, you need to use the Control Toolbox. Go to View
Toolbars Control Toolbox.

Find the Command Button icon and left click it.
Move your mouse to your worksheet to the location you want the button and
left click again.
Right click the mouse on the command button, select properties, and use the
Caption property to change the caption on the button.
Close the properties box.
Right click the mouse and select View Code.
Copy and paste this code between Private Sub and End Sub:

CountRows = Range("C65536").End(xlUp).Row
Cells(CountRows+1,3).Select

Click the Exit Design Mode button in the middle of the Visual Basic Editor
toolbar.

"DME" wrote:

I need to run a Macro(set up a command button) that will take me to the next
open box in a specific column. For instance if I have data in Cells C5 to
C11. I want to run a macro to select cell C12.

I have tried but not being very successful.

I currently have a macro that is setup to run a macro from the cell I am on
(user has to select C12 currently). I want to be able the user to just run
the macro by pressing the command button rather than having to going to cell
c12 then running the macro. In essence, make the process dummy proof. I
have users currently who cannot seem to select the next open cell in the
correct column.

My boss thinks this is impossible, but I told him all I have to do is post
the question out here. This group has made me look like a genius on more
than one ocassion. Thanks!





  #4   Report Post  
DME
 
Posts: n/a
Default

Chuck-

This is exactly what I needed. Aprreciate the help!




"CLR" wrote in message
...
Sub SelectNextCell()
'assumes data starting in C5, will take cursor to bottom of data and
step
'down to next blank cell
Application.Goto Reference:="R5C3"
Selection.End(xlDown).Select
Selection.Offset(1, 0).Select
End Sub

Vaya con Dios,
Chuck, CABGx3


"DME" <craigjoseathotmaildotcom wrote in message
...
I need to run a Macro(set up a command button) that will take me to the

next
open box in a specific column. For instance if I have data in Cells C5

to
C11. I want to run a macro to select cell C12.

I have tried but not being very successful.

I currently have a macro that is setup to run a macro from the cell I am

on
(user has to select C12 currently). I want to be able the user to just

run
the macro by pressing the command button rather than having to going to

cell
c12 then running the macro. In essence, make the process dummy proof.

I
have users currently who cannot seem to select the next open cell in the
correct column.

My boss thinks this is impossible, but I told him all I have to do is

post
the question out here. This group has made me look like a genius on

more
than one ocassion. Thanks!








  #5   Report Post  
CLR
 
Posts: n/a
Default

Glad to be of help.........thanks for the feedback.

Vaya con Dios,
Chuck, CABGx3


"DME" <craigjoseathotmaildotcom wrote in message
...
Chuck-

This is exactly what I needed. Aprreciate the help!




"CLR" wrote in message
...
Sub SelectNextCell()
'assumes data starting in C5, will take cursor to bottom of data and
step
'down to next blank cell
Application.Goto Reference:="R5C3"
Selection.End(xlDown).Select
Selection.Offset(1, 0).Select
End Sub

Vaya con Dios,
Chuck, CABGx3


"DME" <craigjoseathotmaildotcom wrote in message
...
I need to run a Macro(set up a command button) that will take me to

the
next
open box in a specific column. For instance if I have data in Cells

C5
to
C11. I want to run a macro to select cell C12.

I have tried but not being very successful.

I currently have a macro that is setup to run a macro from the cell I

am
on
(user has to select C12 currently). I want to be able the user to

just
run
the macro by pressing the command button rather than having to going

to
cell
c12 then running the macro. In essence, make the process dummy proof.

I
have users currently who cannot seem to select the next open cell in

the
correct column.

My boss thinks this is impossible, but I told him all I have to do is

post
the question out here. This group has made me look like a genius on

more
than one ocassion. 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
Playing a macro from another workbook Jim Excel Discussion (Misc queries) 1 February 23rd 05 10:12 PM
Date macro Hiking Excel Discussion (Misc queries) 9 February 3rd 05 12:40 AM
Macro and If Statement SATB Excel Discussion (Misc queries) 2 December 3rd 04 04:46 PM
Macro Formula revision? Mark Excel Worksheet Functions 1 November 28th 04 01:43 AM
Macro for multiple charts JS Excel Worksheet Functions 1 November 19th 04 03:44 AM


All times are GMT +1. The time now is 02:47 AM.

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"