Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default Linking using Macors

Hello,

I am trying to create an error report based on multiple worksheets in
a workbook. I want to gather 7 or 8 cells from a worksheet and create
a new row in the error report with the information.

I have determine that using this function (='worksheet-name'!$C$7) i
can do it manually. the only macro that i have been able to come up
with hard codes the values in and i dont know how to have it loop
through all worksheets in my workbook.

Any help would be much appreciated

Mike
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,101
Default Linking using Macors

This may get you started
Sub WorksheetLoop()
Dim wsName As String
Dim WS_Count As Integer
Dim i As Integer
WS_Count = _
ActiveWorkbook.Worksheets.Count
' Begin the loop.
For i = 1 To WS_Count
wsName = ActiveWorkbook.Worksheets(i).Name
MsgBox "SheetName is:" & wsName & vbCrLf & _
"Value is" & Worksheets(wsName).Range("A1").Value
Next i
End Sub

" wrote:

Hello,

I am trying to create an error report based on multiple worksheets in
a workbook. I want to gather 7 or 8 cells from a worksheet and create
a new row in the error report with the information.

I have determine that using this function (='worksheet-name'!$C$7) i
can do it manually. the only macro that i have been able to come up
with hard codes the values in and i dont know how to have it loop
through all worksheets in my workbook.

Any help would be much appreciated

Mike

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default Linking using Macors

On Apr 7, 9:17*am, Mike wrote:
This may get you started
*Sub WorksheetLoop()
* *Dim wsName As String
* *Dim WS_Count As Integer
* *Dim i As Integer
* *WS_Count = _
* *ActiveWorkbook.Worksheets.Count
* *' Begin the loop.
* *For i = 1 To WS_Count
* * * wsName = ActiveWorkbook.Worksheets(i).Name
* * * MsgBox "SheetName is:" & wsName & vbCrLf & _
* * * "Value is" & Worksheets(wsName).Range("A1").Value
* *Next i
End Sub



" wrote:
Hello,


I am trying to create an error report based on multiple worksheets in
a workbook. *I want to gather 7 or 8 cells from a worksheet and create
a new row in the error report with the information.


I have determine that using this function (='worksheet-name'!$C$7) i
can do it manually. *the only macro that i have been able to come up
with hard codes the values in and i dont know how to have it loop
through all worksheets in my workbook.


Any help would be much appreciated


Mike- Hide quoted text -


- Show quoted text -


This helped. thank you very much
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,123
Default Linking using Macors

See also this page
http://www.rondebruin.nl/summary.htm

--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


wrote in message ...
On Apr 7, 9:17 am, Mike wrote:
This may get you started
Sub WorksheetLoop()
Dim wsName As String
Dim WS_Count As Integer
Dim i As Integer
WS_Count = _
ActiveWorkbook.Worksheets.Count
' Begin the loop.
For i = 1 To WS_Count
wsName = ActiveWorkbook.Worksheets(i).Name
MsgBox "SheetName is:" & wsName & vbCrLf & _
"Value is" & Worksheets(wsName).Range("A1").Value
Next i
End Sub



" wrote:
Hello,


I am trying to create an error report based on multiple worksheets in
a workbook. I want to gather 7 or 8 cells from a worksheet and create
a new row in the error report with the information.


I have determine that using this function (='worksheet-name'!$C$7) i
can do it manually. the only macro that i have been able to come up
with hard codes the values in and i dont know how to have it loop
through all worksheets in my workbook.


Any help would be much appreciated


Mike- Hide quoted text -


- Show quoted text -


This helped. thank you very much
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
Learning Basic Macors SG Excel Worksheet Functions 1 August 7th 07 08:44 AM
Linking H&AE Excel Discussion (Misc queries) 2 April 9th 07 12:52 PM
Help with linking MAPB Links and Linking in Excel 0 March 9th 06 04:17 PM
Linking To Don Fischer Excel Discussion (Misc queries) 1 February 27th 06 06:02 PM
Macors do not run correctly from icon TonyL Excel Discussion (Misc queries) 2 March 15th 05 07:49 AM


All times are GMT +1. The time now is 02:46 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"