Re: $$Excel-Macros$$ Re: vba to close workbook if last row with data = 10

2009-11-11 Thread OSAVentures Calamba
Thank you Hemant, I'm just limiting the number of records the user is able to store. I'm using template, before going further user has to input some codes to proceed. Thnks. On Thu, Nov 12, 2009 at 12:08 AM, Hemant Hegde wrote: > Hi :) > > Why do you want to do that with the poor user? (he wil

$$Excel-Macros$$ Re: vba to close workbook if last row with data = 10

2009-11-11 Thread Hemant Hegde
Hi :) Why do you want to do that with the poor user? (he will have to re-open it and probably with macros turned off) You can Protect the sheet or Set the scroll area by putting this code : Sheets("name").scrollArea="A1:Z10" If you anyway want to close the workbook, this can help write If no

$$Excel-Macros$$ Re: vba to close workbook if last row with data = 10

2009-11-09 Thread OSAVentures Calamba
Dear Paul and gurus, I want to find the last row. Is this OK? Private Sub Worksheet_Change(ByVal Target As Range) Dim LastRow As Long If WorksheetFunction.CountA(Cells) > 0 Then 'Search for any entry, by searching backwards by Rows. LastRow = Cells.Find(What:="*", After:=[A1], _

$$Excel-Macros$$ Re: vba to close workbook if last row with data = 10

2009-11-09 Thread OSAVentures Calamba
Dear Paul, 'This is the event Private Sub Worksheet_Change(ByVal Target As Range) ' i want to test if the last row is with data is 10th row or greater. is there a need for dim declaration? Basically a code to test if the user is using the 10th row or more. I want to limit the data until row numb

$$Excel-Macros$$ Re: vba to close workbook if last row with data = 10

2009-11-09 Thread OSAVentures Calamba
good morning Paul & Paulo I like both your name.. Well sorry for confusing you.. anyway. i think you are right i need to put some vba in that worksheet where if the rows with data is 10 or more. ( yes rows 1-9 has data) I want to limit the inputs of the user to upto 10 rows only. the worksheet

$$Excel-Macros$$ Re: vba to close workbook if last row with data = 10

2009-11-09 Thread PauloBR
Good Morning Dellosa, How many rows and columns do you have in your sheet? Please, give us more information about your problem... Best Regards On 9 nov, 02:31, OSAVentures Calamba wrote: > dear gurus, > > i need to close a workbook if last row with data =10,  Any VBA suggestion > please? > >

$$Excel-Macros$$ Re: vba to close workbook if last row with data = 10

2009-11-09 Thread Paul
What do you mean by "last row with data = 10"? do you mean that row #10 has data? or that the last row with data has a VALUE of 10 in a specific column? will there be data in rows 1-9? What columns will the data be in? look for ANY data in row 10? What do you want to use to trigger the event? Whe