Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Moving the cursor position

Hi All,

I am fairly new to programming Excel, and when I do itis either through C++
or C# so my terminoligy may not be correct but this is what I want to do.

I have to populate several spreadsheets in a workbook from a SQLServer
database using ADO, which I do without any problems.

After I have finished populating each sheet I want to move back to cell A1
and then move on to the next sheet.

The theory is that when I save the book and re-open it I will see cell A1
on each sheet. Currently I am on cell AB445, or some such number.

My question is how do move back to cell A1 after opulating the sheet. I
will need to know what object the method belongs to, i.e. Workbook,
Worksheet, Range etc.


TIA
Peter
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 253
Default Moving the cursor position

Hi Peter,
Worksheets(x).range("A1").activate
Regards
JY

"Peter Longstaff" <peter_dot_longstaff@nowhere_dot_com wrote in message
48.16...
Hi All,

I am fairly new to programming Excel, and when I do itis either through

C++
or C# so my terminoligy may not be correct but this is what I want to do.

I have to populate several spreadsheets in a workbook from a SQLServer
database using ADO, which I do without any problems.

After I have finished populating each sheet I want to move back to cell A1
and then move on to the next sheet.

The theory is that when I save the book and re-open it I will see cell A1
on each sheet. Currently I am on cell AB445, or some such number.

My question is how do move back to cell A1 after opulating the sheet. I
will need to know what object the method belongs to, i.e. Workbook,
Worksheet, Range etc.


TIA
Peter



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Moving the cursor position


you can also do so one time for all worksheets:

With ActiveWorkbook
For i = 1 To .Sheets.Count
.Sheets(i).Select
Range("a1").Select
Next
End Wit

--
antoka0
-----------------------------------------------------------------------
antoka05's Profile: http://www.excelforum.com/member.php...fo&userid=2902
View this thread: http://www.excelforum.com/showthread.php?threadid=48763

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Moving the cursor position

antoka05 wrote in
:


you can also do so one time for all worksheets:

With ActiveWorkbook
For i = 1 To .Sheets.Count
Sheets(i).Select
Range("a1").Select
Next
End With



Unfortunately neither of these suggestions worked. I think it is because
the workbook is not visible.

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
cursor position MarkT Excel Discussion (Misc queries) 5 February 7th 07 01:25 PM
Cursor Position in VBE ehntd[_4_] Excel Programming 1 November 2nd 04 05:50 PM
cursor position choice[_2_] Excel Programming 1 August 22nd 04 11:49 PM
cursor position Fan Fan Excel Programming 3 August 14th 04 01:12 AM
Position Cursor to A1 Dennis Damsgaard Excel Programming 3 June 8th 04 10:30 PM


All times are GMT +1. The time now is 11:47 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"