Hello,
Here is an example if the setting can be done using row 1 :

Private Sub Worksheet_Activate()
Dim lastcolumn
lastcolumn = Cells(1, Columns.Count).End(xlToLeft).Offset(, 1).Column
Cells(1, lastcolumn).Select
End Sub

Regards.
Daniel

-----Message d'origine-----
De : excel-macros@googlegroups.com [mailto:excel-mac...@googlegroups.com] De
la part de Rajesh K R
Envoyé : mardi 7 décembre 2010 16:18
À : excel-macros@googlegroups.com
Objet : Re: $$Excel-Macros$$ Select the next cell when the page open

Hi
i got a mistake in my code here is the correct one

Private Sub Worksheet_Activate()
Dim lastrow
lastrow = Cells(Rows.Count, 12).End(xlUp).Offset(1, 0).Row Cells(lastrow,
12).Select End Sub Regards Rajesh kainikkara

On 12/7/10, Rajesh K R <rajeshkainikk...@gmail.com> wrote:
> HI Daniel
> here is the code what i am using the last raw in a work sheet when it 
> activate i want a code like this instead of row here i want to find 
> the next column.
>
> Private Sub Worksheet_Activate()
> Dim lastcolumn
> lastcolumn = Cells(Columns.Count, 12).End(xlUp).Offset(1, 0).Row 
> Cells(lastcolumn, 12).Select End Sub
>
> Thanks & Regards
> Rajesh Kainikkara
>
> On 12/6/10, Daniel <dcolarde...@free.fr> wrote:
>> Hello.
>> Maybe :
>> Columns(Day(Date)).Select
>> Regards.
>> Daniel
>>
>> -----Message d'origine-----
>> De : excel-macros@googlegroups.com 
>> [mailto:excel-mac...@googlegroups.com]
>> De
>> la part de Rajesh K R
>> Envoyé : lundi 6 décembre 2010 17:26
>> À : excel-macros
>> Objet : $$Excel-Macros$$ Select the next cell when the page open
>>
>> Hi Experts
>>
>> I am using an excel sheet for attendance marking sheet have 31 
>> columns for each day.
>> if i mark the attendance up to 5th , i want to get select the column 
>> for 6th day automatically when i open the page.how can write the code
>>  1 a b c d e f
>>  2 1 2 3 4 5 6
>>  3 x x x x x
>>  4 x x x x x
>>
>> Thanks in advance
>> Ragards
>>
>> Rajesh kainikkara
>>
>> --
>> ---------------------------------------------------------------------
>> -------
>> ------
>> Some important links for excel users:
>> 1. Follow us on TWITTER for tips tricks and links :
>> http://twitter.com/exceldailytip 2. Join our LinkedIN group @
>> http://www.linkedin.com/groups?gid=1871310
>> 3. Excel tutorials at http://www.excel-macros.blogspot.com
>> 4. Learn VBA Macros at http://www.quickvba.blogspot.com 5. Excel Tips 
>> and Tricks at http://exceldailytip.blogspot.com
>>
>> To post to this group, send email to excel-macros@googlegroups.com
>>
>> <><><><><><><><><><><><><><><><><><><><><><>
>> Like our page on facebook , Just follow below link 
>> http://www.facebook.com/pages/discussexcelcom/160307843985936?v=wall&;
>> ref=ts
>>
>> --
>> ---------------------------------------------------------------------
>> ------------- Some important links for excel users:
>> 1. Follow us on TWITTER for tips tricks and links :
>> http://twitter.com/exceldailytip
>> 2. Join our LinkedIN group @ 
>> http://www.linkedin.com/groups?gid=1871310
>> 3. Excel tutorials at http://www.excel-macros.blogspot.com
>> 4. Learn VBA Macros at http://www.quickvba.blogspot.com 5. Excel Tips 
>> and Tricks at http://exceldailytip.blogspot.com
>>
>> To post to this group, send email to excel-macros@googlegroups.com
>>
>> <><><><><><><><><><><><><><><><><><><><><><>
>> Like our page on facebook , Just follow below link 
>> http://www.facebook.com/pages/discussexcelcom/160307843985936?v=wall&;
>> ref=ts
>>
>

--
----------------------------------------------------------------------------
------
Some important links for excel users:
1. Follow us on TWITTER for tips tricks and links :
http://twitter.com/exceldailytip 2. Join our LinkedIN group @
http://www.linkedin.com/groups?gid=1871310
3. Excel tutorials at http://www.excel-macros.blogspot.com
4. Learn VBA Macros at http://www.quickvba.blogspot.com 5. Excel Tips and
Tricks at http://exceldailytip.blogspot.com
 
To post to this group, send email to excel-macros@googlegroups.com

<><><><><><><><><><><><><><><><><><><><><><>
Like our page on facebook , Just follow below link
http://www.facebook.com/pages/discussexcelcom/160307843985936?v=wall&ref=ts

-- 
----------------------------------------------------------------------------------
Some important links for excel users:
1. Follow us on TWITTER for tips tricks and links : 
http://twitter.com/exceldailytip
2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
3. Excel tutorials at http://www.excel-macros.blogspot.com
4. Learn VBA Macros at http://www.quickvba.blogspot.com
5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 
To post to this group, send email to excel-macros@googlegroups.com

<><><><><><><><><><><><><><><><><><><><><><>
Like our page on facebook , Just follow below link
http://www.facebook.com/pages/discussexcelcom/160307843985936?v=wall&ref=ts

Reply via email to