Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
PING: Bernie Deitrick - Calloway Golf Scoring | Excel Discussion (Misc queries) | |||
Bernie Deitrick | Excel Discussion (Misc queries) | |||
I have clairified some info., maybe, I can be helped now ......... | Excel Worksheet Functions | |||
Bernie, Dave, Doug, et. al. - question for you | Excel Discussion (Misc queries) | |||
Bernie Deitrick | Excel Worksheet Functions |