Home |
Search |
Today's Posts |
#1
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Playing a macro from another workbook | Excel Discussion (Misc queries) | |||
Date macro | Excel Discussion (Misc queries) | |||
Macro and If Statement | Excel Discussion (Misc queries) | |||
Macro Formula revision? | Excel Worksheet Functions | |||
Macro for multiple charts | Excel Worksheet Functions |