Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 222
Default VBA Question - Bernie Deitrick helped me previously


I have a Workbook (w/b) with 50 odd Worksheets (w/s)starting with a
"Summary" w/s and a blank "Master w/s" which is copied for each new name
added. VBA as follows;

Sub MakeLinks()
Dim myR As Long
With Worksheets("Standings")
myR = .Range("F" & Rows.Count).End(xlUp)(2).Row
..Range("F" & myR).Formula = "='" & ActiveSheet.Name & "'!M75"
..Range("H" & myR).Formula = "='" & ActiveSheet.Name & "'!D75"
..Range("I" & myR).Formula = "='" & ActiveSheet.Name & "'!F73"
..Range("J" & myR).Formula = "='" & ActiveSheet.Name & "'!H73"
..Range("K" & myR).Formula = "='" & ActiveSheet.Name & "'!J73"
..Range("L" & myR).Formula = "='" & ActiveSheet.Name & "'!L73"
..Range("M" & myR).Formula = "='" & ActiveSheet.Name & "'!M71"
..Range("C" & myR).Formula = "='" & ActiveSheet.Name & "'!B2"
End With
End Sub

Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
If Target.Address = "$B$2" Then Sh.Name = Target.Value
End Sub

Macro is - Sheet2.MakeLinks - Macros in: This Workbook

This all works beautifully! My problem is; I have now started a new File
by copying the original for a new Region. This new file does not work. VBA
keeps using file names fom the original and will not post. Everything in the
New File is indentical except names. I DO NOT want the two Files to link to
each other.

Obviously, after I copied the original, VBA will not allow me to use same
VBA. I am getting an Error #400

Can anyone help?

Bob



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
PING: Bernie Deitrick - Calloway Golf Scoring Duncs Excel Discussion (Misc queries) 6 August 1st 07 03:00 AM
Bernie Deitrick CBrausa Excel Discussion (Misc queries) 1 May 5th 06 10:27 PM
I have clairified some info., maybe, I can be helped now ......... Denny Crane Excel Worksheet Functions 1 March 3rd 06 04:51 AM
Bernie, Dave, Doug, et. al. - question for you Ron M. Excel Discussion (Misc queries) 3 February 25th 06 11:57 PM
Bernie Deitrick Trying to excel in life but need help Excel Worksheet Functions 1 January 19th 05 03:27 PM


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