Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() 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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
cursor position | Excel Discussion (Misc queries) | |||
Cursor Position in VBE | Excel Programming | |||
cursor position | Excel Programming | |||
cursor position | Excel Programming | |||
Position Cursor to A1 | Excel Programming |