![]() |
Trying to Avoid Selecting Sheets
Variables are Curr1 and Curr2
This code is in a module, which is run threw a button on Sheet14, I need to get the variables assigned from Sheet 12 and use them in Sheet14. This works fine as it is, but as the amatuer I am (first proj. in vba) I know your suppose to avoid selecting anything, except I don't know how to do it. So the code is correct, I'm just tyring to use it without the Select command, because I believe it is slowing me down. It takes 16 secs to create a 20x1400 table. Suggestions? ----------------------------------------------------------- Sheet12.Select Cells(8, 41).Select Do If IsEmpty(ActiveCell) = False Then ActiveCell.Offset(1, 0).Select End If Loop Until IsEmpty(ActiveCell) = True Do If IsEmpty(ActiveCell) = True Then ActiveCell.Offset(1, 0).Select End If Loop Until IsEmpty(ActiveCell) = False Dim curr1 'Shear Starting Point Row curr1 = ActiveCell.Row Do If IsEmpty(ActiveCell) = False Then ActiveCell.Offset(1, 0).Select End If Loop Until IsEmpty(ActiveCell) = True Do If IsEmpty(ActiveCell) = True Then ActiveCell.Offset(1, 0).Select End If Loop Until IsEmpty(ActiveCell) = False Dim curr2 'Deflection Starting Point Row curr2 = ActiveCell.Row Sheet14.Select |
Trying to Avoid Selecting Sheets
Sub SetRows()
With Sheet12 curr1 = .Cells(8, 2).End(xlDown).End(xlDown).Row curr2 = .Cells(curr1, 2).End(xlDown).End(xlDown).Row End With End Sub -- Regards, Tom Ogilvy "Kevin O'Neill" wrote in message oups.com... Variables are Curr1 and Curr2 This code is in a module, which is run threw a button on Sheet14, I need to get the variables assigned from Sheet 12 and use them in Sheet14. This works fine as it is, but as the amatuer I am (first proj. in vba) I know your suppose to avoid selecting anything, except I don't know how to do it. So the code is correct, I'm just tyring to use it without the Select command, because I believe it is slowing me down. It takes 16 secs to create a 20x1400 table. Suggestions? ----------------------------------------------------------- Sheet12.Select Cells(8, 41).Select Do If IsEmpty(ActiveCell) = False Then ActiveCell.Offset(1, 0).Select End If Loop Until IsEmpty(ActiveCell) = True Do If IsEmpty(ActiveCell) = True Then ActiveCell.Offset(1, 0).Select End If Loop Until IsEmpty(ActiveCell) = False Dim curr1 'Shear Starting Point Row curr1 = ActiveCell.Row Do If IsEmpty(ActiveCell) = False Then ActiveCell.Offset(1, 0).Select End If Loop Until IsEmpty(ActiveCell) = True Do If IsEmpty(ActiveCell) = True Then ActiveCell.Offset(1, 0).Select End If Loop Until IsEmpty(ActiveCell) = False Dim curr2 'Deflection Starting Point Row curr2 = ActiveCell.Row Sheet14.Select |
Trying to Avoid Selecting Sheets
That's pretty amazing looking, thanks.
|
All times are GMT +1. The time now is 12:18 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com