Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 25
Default Creating spreadsheets for managers with mutiple tabs

Hello,

I'm modifying a macro created by someone else years before, and I'm trying
to clean up a process, but I'm experiencing some difficulty getting it to
work right.

At the moment the macro looks at a list of managers and applications in one
spreadsheet, filters for each manager and pastes the results into a template
spreadsheet which it saves with the manager's name. Though I'm sure there's
an easier way to do this, this part works fine.

When the person created the macro this reporting only covered about 4
applications, but today we're looking at 30+ for each manager (each
application in its own tab) and the macro is crashing halfway through.

If they don't have any users on a given application, I don't want a new tab
created (keeps the file size down, and reduces unnecessary clicking on their
part).

Below is the end part of the code, where it's crashing (Master = the
spreadsheet with all applications and all managers):

Windows(Master).Activate
For Applc = 1 To Sheets.Count
AttReq = "Yes"
Windows(Master).Activate
Sheets(Applc).Select
SheetName = ActiveSheet.Name

Selection.AutoFilter Field:=1, Criteria1:=SPOC

Cells.Select
Selection.Copy

Windows(SPOCFile).Activate

Sheets(SheetName).Select
Range("A1").Select
ActiveSheet.Paste
Application.CutCopyMode = False

Cells.EntireColumn.AutoFit
Range("A1").Select

If IsEmpty(Cells(2, 1).Value) Then
Cells.Select
Selection.Clear

End If

Is there a way to clear the paste, or a better way to do this?

Thanks for any help you may be able to offer!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 25
Default Creating spreadsheets for managers with mutiple tabs

Anyone...?

Thanks...!

"Nico" wrote:

Hello,

I'm modifying a macro created by someone else years before, and I'm trying
to clean up a process, but I'm experiencing some difficulty getting it to
work right.

At the moment the macro looks at a list of managers and applications in one
spreadsheet, filters for each manager and pastes the results into a template
spreadsheet which it saves with the manager's name. Though I'm sure there's
an easier way to do this, this part works fine.

When the person created the macro this reporting only covered about 4
applications, but today we're looking at 30+ for each manager (each
application in its own tab) and the macro is crashing halfway through.

If they don't have any users on a given application, I don't want a new tab
created (keeps the file size down, and reduces unnecessary clicking on their
part).

Below is the end part of the code, where it's crashing (Master = the
spreadsheet with all applications and all managers):

Windows(Master).Activate
For Applc = 1 To Sheets.Count
AttReq = "Yes"
Windows(Master).Activate
Sheets(Applc).Select
SheetName = ActiveSheet.Name

Selection.AutoFilter Field:=1, Criteria1:=SPOC

Cells.Select
Selection.Copy

Windows(SPOCFile).Activate

Sheets(SheetName).Select
Range("A1").Select
ActiveSheet.Paste
Application.CutCopyMode = False

Cells.EntireColumn.AutoFit
Range("A1").Select

If IsEmpty(Cells(2, 1).Value) Then
Cells.Select
Selection.Clear

End If

Is there a way to clear the paste, or a better way to do this?

Thanks for any help you may be able to offer!

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
Open mutiple spreadsheets in one session of Excel and use 'ALT' + ppatel Setting up and Configuration of Excel 2 June 23rd 09 09:39 PM
Running mutiple excel sheets on mutiple computers Lost Excel Discussion (Misc queries) 3 January 16th 09 12:32 AM
Employees & Managers NirOrtal Excel Discussion (Misc queries) 3 October 17th 08 07:05 AM
How to use mutiple spreadsheets in a pivot table? Ian Peers Excel Discussion (Misc queries) 1 August 10th 05 08:54 PM
creating mutiple worksheets malvis Excel Discussion (Misc queries) 1 August 2nd 05 10:54 PM


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