Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default 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
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
All data in my worksheet was lost how do I retrieve it Paulette Excel Worksheet Functions 1 September 18th 09 09:22 PM
retrieve data from worksheet Dennis Excel Worksheet Functions 0 January 20th 08 07:33 PM
Avoiding Errors When Attempting To Retrieve Data From A Non-existant Worksheet BloodyShrapnel Excel Worksheet Functions 1 March 24th 06 01:25 AM
Retrieve data from all of the worksheet within the file dannyboy213 Excel Worksheet Functions 1 March 22nd 06 06:51 PM
How do I retrieve data deleted from a worksheet? Risky business Excel Discussion (Misc queries) 1 August 9th 05 02:40 AM


All times are GMT +1. The time now is 06:50 AM.

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"