Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel,microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Help With Worksheet Operations

Is there any way in vba code to reproduce the same functionality in Excel as
pressing Ctrl+right and/or Ctrl+down? I need a quick way to move to the last
column and the last row on a spreadsheet.

Also, is there a quick way to convert the worksheet to a string array or
anything else (maybe a dataset)?


  #2   Report Post  
Posted to microsoft.public.excel,microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default Help With Worksheet Operations

Try Some Like this

Sub MovetoEndDown()
Range("A1").End(xlDown).Activate '(xlToRight) in case you want to move to
the right.
End Sub
or
Sub MoveDownPlus1Row()
Dim NextRow As Variant
NextRow = Range("A20000").End(xlUp).Row + 1
Cells(NextRow, 1).Activate
End Sub

Hope this works.
Jose Rojas

"Justin Starnes" wrote in message
...
Is there any way in vba code to reproduce the same functionality in Excel

as
pressing Ctrl+right and/or Ctrl+down? I need a quick way to move to the

last
column and the last row on a spreadsheet.

Also, is there a quick way to convert the worksheet to a string array or
anything else (maybe a dataset)?




  #3   Report Post  
Posted to microsoft.public.excel,microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Help With Worksheet Operations

Dim vArr as Variant
vArr = ActiveWorksheets.UsedRange.Value

for i = lbound(varr,1) to ubound(varr,1)
for j = lbound(varr,2) to ubound(varr,2)
debug.print i,j, varr(i,j)
Next
Next

Regards,
Tom Ogilvy



Justin Starnes wrote in message
...
Is there any way in vba code to reproduce the same functionality in Excel

as
pressing Ctrl+right and/or Ctrl+down? I need a quick way to move to the

last
column and the last row on a spreadsheet.

Also, is there a quick way to convert the worksheet to a string array or
anything else (maybe a dataset)?




  #4   Report Post  
Posted to microsoft.public.excel,microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Help With Worksheet Operations

Thanks!
Justin

"Jose Rojas" wrote in message
...
Try Some Like this

Sub MovetoEndDown()
Range("A1").End(xlDown).Activate '(xlToRight) in case you want to move to
the right.
End Sub
or
Sub MoveDownPlus1Row()
Dim NextRow As Variant
NextRow = Range("A20000").End(xlUp).Row + 1
Cells(NextRow, 1).Activate
End Sub

Hope this works.
Jose Rojas

"Justin Starnes" wrote in message
...
Is there any way in vba code to reproduce the same functionality in

Excel
as
pressing Ctrl+right and/or Ctrl+down? I need a quick way to move to the

last
column and the last row on a spreadsheet.

Also, is there a quick way to convert the worksheet to a string array or
anything else (maybe a dataset)?






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
bitwise operations as in xor stevenshrii Excel Discussion (Misc queries) 2 April 16th 09 09:43 AM
Repeat Operations Adam1 Chicago Excel Discussion (Misc queries) 4 January 25th 07 04:31 PM
how to concatenate operations k_d_w Excel Worksheet Functions 1 October 5th 06 11:50 AM
OWC operations in Excel mondayisgreat Excel Discussion (Misc queries) 0 March 3rd 06 03:07 PM
Repeating VBA operations Adam1 Chicago Excel Discussion (Misc queries) 3 March 1st 05 07:05 PM


All times are GMT +1. The time now is 02:06 PM.

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"