Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 246
Default Replace Input box with Project Array

I have code that works as expected with an input box. I would like the
input box replaced with the array of projects, which are defined in
column "A" of the active sheet starting at Row 5. The projects are
defined by the left (6) characters in "A". Need help. TIA

For example column data:

05-001-000-000-000
06-001-000-000-000 etc.

Projects are 05-001 and 06-001. The code:

Sub Copy340WIP()
Dim WBwip As Workbook
Dim WB2 As Workbook

Set WB2 = ActiveWorkbook

On Error Resume Next
Set WBwip = Workbooks("RF 340-000.xls")
On Error GoTo 0
If WBwip Is Nothing Then
ChDir "S:\FIN\Finance\Capital Projects\WIP Detail"
Workbooks.Open filename:= _
"S:\FIN\Finance\Capital Projects\WIP Detail\RF 340-000.xls"
Else
'already open
End If

WBwip.Sheets("340-000-900 Pivot Table").Activate

Call FindStr("Proj")

Selection.ShowDetail = True

ActiveSheet.Move After:=WB2.Worksheets(WB2.Worksheets.Count)

Application.DisplayAlerts = True

End Sub

Function FindStr(FindProj As String) As String
Dim frng As Range

FindProj = InputBox("Enter Project Number, such as 00-000", "Enter
Project Number", "06-012") <<<<<<<REPLACE THIS WITH PROJECT ARRAY

Set frng = Cells.Find(what:=FindProj, LookIn:=xlFormulas,
lookat:=xlPart)
If Not frng Is Nothing Then
FindStr = frng.Offset(0, 9).Address(1, 1, xlA1)
Else
MsgBox ("Proj, not found")
End If
frng.Offset(0, 9).Activate

End Function

Greg

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
Unique project names with complex array formulas FifthFormula Excel Discussion (Misc queries) 8 January 16th 10 10:52 AM
how do i find and replace using variable input Program Icons Showing arrow Excel Programming 0 May 8th 06 03:28 AM
how do i find and replace using variable input Program Icons Showing arrow Excel Programming 0 May 8th 06 03:27 AM
Pass array from Project to Excel Sarah[_5_] Excel Programming 2 April 12th 04 07:30 PM
replace line of code in vba protected project Konrad[_5_] Excel Programming 0 November 26th 03 08:27 PM


All times are GMT +1. The time now is 01:43 PM.

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"