Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Learning Basic Macors | Excel Worksheet Functions | |||
Linking | Excel Discussion (Misc queries) | |||
Help with linking | Links and Linking in Excel | |||
Linking | Excel Discussion (Misc queries) | |||
Macors do not run correctly from icon | Excel Discussion (Misc queries) |