LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Assistance with macro to determine if a specific worksheet is

Hi Barb,

This is what I think you want

Set oWB = Workbooks.open _
Filename:= cells(i,"A").Value & "\" & Cells(i,"G").Value, _
UpdateLinks:= 0


--

HTH

Bob Phillips

(remove nothere from the email address if mailing direct)

"Barb Reinhardt" wrote in message
...
Bob,

I have a bit of a glitch that I'm sure you can help with. There are some
documents that when opened, display a message asking if I want to update
links. I don't. What needs to be changed in the following code?

Thanks,
Barb

"Bob Phillips" wrote:


For i = 2 To Cells(Rows.Count,"A").End(xlUp).Row
Set oWB = Workbooks.open Filename:= _
cells(i,"A").Value & "\" & Cells(i,"G").Value
Set sh = Nothing
on Error Resume Next
Set sh = oWB.Worksheets("Sheet3")
On Error Goto 0
If Not sh Is Nothing Then Cells(i,"H").Value = "yes"
oWB.Close SaveChanges:=False
Next i

--

HTH

Bob Phillips

(remove nothere from the email address if mailing direct)

"Barb Reinhardt" wrote in

message
...
I have a list of workbooks and need to determine if a specific

worksheet
(say
Sheet3) is present in that workbook. I have the following:

Column A: Y:\BLAH\BLAH\Blah
Column G: filename.xls

The workbook is in the following location
Y:\BLAH\BLAH\Blah\filename.xls

The data starts on row 2 and I can determine the last row of data.

I'd
like to have something written to column H if Sheet3 is present in the
workbook.

Thanks in advance,
Barb Reinhardt






 
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
How do I get a macro to be non worksheet specific? navel151 Excel Worksheet Functions 6 January 4th 10 09:46 PM
Avoiding the worksheet specific name in a macro Jeff Modares Excel Discussion (Misc queries) 2 September 23rd 09 07:57 PM
How to run specific macro on selected worksheet? Harshad[_2_] Excel Discussion (Misc queries) 2 October 31st 08 06:56 AM
make a macro 'worksheet specific' Lori Excel Discussion (Misc queries) 11 October 29th 07 12:38 AM
Help with a macro to open to a specific worksheet EAHRENS Excel Worksheet Functions 0 November 30th 05 08:36 PM


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