Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
macro confusion
I am trying to create a macro that will perform the same function on
different tabs in a workbook, but whenever i try to run the macro for various tabs, the macro defaults to the original tab that the macro was created in and I end up getting an error message with options to end, debug, or cancel. does anyone have suggestions to how i can fix this? |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
macro confusion
Hi,
I suspect we may have more idea if we saw the macro. Mike "scott" wrote: I am trying to create a macro that will perform the same function on different tabs in a workbook, but whenever i try to run the macro for various tabs, the macro defaults to the original tab that the macro was created in and I end up getting an error message with options to end, debug, or cancel. does anyone have suggestions to how i can fix this? |
#3
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
macro confusion
Perhaps you can share your code for comments
activesheet. -- Don Guillett Microsoft MVP Excel SalesAid Software "scott" wrote in message ... I am trying to create a macro that will perform the same function on different tabs in a workbook, but whenever i try to run the macro for various tabs, the macro defaults to the original tab that the macro was created in and I end up getting an error message with options to end, debug, or cancel. does anyone have suggestions to how i can fix this? |
#4
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
macro confusion
I believe I deleted the macro because it wasn't working. Here is my
scenario. In a workbook I have a tab for each month of the year, and in each tab I am using a 5-point moving average for data that is tabulated for each day of the month. I also have a tab that summarizes each month, and the only data that I am putting in that tab is the month, and overall average for each month. Since the overall average in each tab lies in the same cell (h35), I want a macro that can go to each tab, pull the value in h35, and return that value to the summary tab for each respective month. Is this possible? "Mike H" wrote: Hi, I suspect we may have more idea if we saw the macro. Mike "scott" wrote: I am trying to create a macro that will perform the same function on different tabs in a workbook, but whenever i try to run the macro for various tabs, the macro defaults to the original tab that the macro was created in and I end up getting an error message with options to end, debug, or cancel. does anyone have suggestions to how i can fix this? |
#5
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
macro confusion
dim wks as worksheet
for each wks in activeworkbook.worksheets wks.range("A1").value = "hi" wks.range("b1").clearcontents next wks Make sure you qualify each range (or object or property or method) with "wks.". scott wrote: I am trying to create a macro that will perform the same function on different tabs in a workbook, but whenever i try to run the macro for various tabs, the macro defaults to the original tab that the macro was created in and I end up getting an error message with options to end, debug, or cancel. does anyone have suggestions to how i can fix this? -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
MDI Confusion | Excel Discussion (Misc queries) | |||
COUNTA Confusion.... | Excel Discussion (Misc queries) | |||
Conditional Confusion | Excel Worksheet Functions | |||
Formula confusion | Excel Worksheet Functions | |||
Confusion..... | Excel Discussion (Misc queries) |