LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Adding an Array

This is similiar to a previous post but I think I have my problem reduced even further. I think all I need here is to set up an array and pass the value of that through my current macro. There are 4 places were the value of the array would need to be inputed (as seen below <--Value From Array--). The values for the array will be on "sheet2" of the "ReportOne.xls" file, in column "E".There will be anywhere from 1 to 4 values there. The data that the autofilter is filtering will be on "sheet1" of "ReportOne.xls". I need to loop through my current macro passing into it in those four places each value from the array

My problem is I don't really know how to use arrays, especially in this manner - I think it is all I need - and this is the only solution I can put together that can come close to figuring out for my problem. Any help on this would be great. This is as far as I can take this alone

Sub FindOrCreate(
Application.DisplayAlerts = Fals
Dim MyPath As Strin
Dim sh As Workshee
Workbooks.Open (ThisWorkbook.Path & "\ReportOne.xls"
Set sh = ActiveWorkbook.ActiveShee
With s
.Columns("A:I").AutoFilter Field:=8, Criteria1:= <--Value From Array--
.Columns("A:I").SpecialCells(xlCellTypeVisible).Co p
If Dir(ThisWorkbook.Path & "\ProgramData\FileData\StoredData\ <--Value From Array--") < "" The
'Ope
Workbooks.Open (ThisWorkbook.Path & "\ProgramData\FileData\StoredData\
<--Value From Array--" & ".xls"
Els
'Creat
Workbooks.Ad
Sheets("Sheet2").Selec
ActiveWindow.SelectedSheets.Delet
Sheets("Sheet3").Selec
ActiveWindow.SelectedSheets.Delet
End I
Sheets("Sheet1").Range("A1").PasteSpecia
.Columns("I:I").AutoFilte
.SaveAs Filename:=ThisWorkbook.Path & "\ProgramData\FileData\StoredData\
<--Value From Array--" & ".xls"
FileFormat:=xlNormal,
Password:="",
WriteResPassword:="",
ReadOnlyRecommended:=False,
CreateBackup:=Fals
.Clos
End Wit
Application.DisplayAlerts = Tru
End Su

Thanks in advance for your time
Jim
 
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
Adding if to Average If Array function Diddy Excel Worksheet Functions 5 December 10th 09 03:45 PM
Adding " , ) to text array Matt A. Setting up and Configuration of Excel 1 May 26th 09 05:28 PM
Adding up with array formula vsoler Excel Worksheet Functions 2 May 26th 07 02:30 AM
adding cells within an array beecher Excel Worksheet Functions 11 August 30th 06 08:29 AM
Adding rows to an array chris w Excel Worksheet Functions 1 December 10th 04 02:27 AM


All times are GMT +1. The time now is 08:14 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"