Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Help on retrieve data in each worksheet
I try to write a program to retrieve data from a database for eac worksheet, but fail :( , would you mind to help me what problems fo the below codings? ================================= Sub Macro1() Dim sh As Worksheet For Each sh In ThisWorkbook.Worksheets Range("A1", "AZ171").Select Application.Run Macro:=("EssMenuRetrieve") Range("A173", "AZ344").Select Application.Run Macro:=("EssMenuRetrieve") Next sh End Sub ================================= -- keld ----------------------------------------------------------------------- keldo's Profile: http://www.excelforum.com/member.php...fo&userid=1391 View this thread: http://www.excelforum.com/showthread.php?threadid=27073 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Help on retrieve data in each worksheet
Without knowing what EssMenuRetrieve does, maybe...
Sub Macro1() Dim sh As Worksheet For Each sh In ThisWorkbook.Worksheets sh.select Range("A1", "AZ171").Select Application.Run Macro:=("EssMenuRetrieve") Range("A173", "AZ344").Select Application.Run Macro:=("EssMenuRetrieve") Next sh End Sub keldo wrote: I try to write a program to retrieve data from a database for each worksheet, but fail :( , would you mind to help me what problems for the below codings? ================================= Sub Macro1() Dim sh As Worksheet For Each sh In ThisWorkbook.Worksheets Range("A1", "AZ171").Select Application.Run Macro:=("EssMenuRetrieve") Range("A173", "AZ344").Select Application.Run Macro:=("EssMenuRetrieve") Next sh End Sub ================================== -- keldo ------------------------------------------------------------------------ keldo's Profile: http://www.excelforum.com/member.php...o&userid=13913 View this thread: http://www.excelforum.com/showthread...hreadid=270736 -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
All data in my worksheet was lost how do I retrieve it | Excel Worksheet Functions | |||
retrieve data from worksheet | Excel Worksheet Functions | |||
Avoiding Errors When Attempting To Retrieve Data From A Non-existant Worksheet | Excel Worksheet Functions | |||
Retrieve data from all of the worksheet within the file | Excel Worksheet Functions | |||
How do I retrieve data deleted from a worksheet? | Excel Discussion (Misc queries) |