LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 26
Default Updating macros with copied worksheet information

Hi - am currently using Excel 2003
I really appreciate any help on this. I am using a master worksheet (new) to
create and copy to other sheets and am using macro to auto update tab name
from cell A2 - this works great.
Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, _
ByVal Target As Range)
ActiveSheet.Name = Range("a2").Value
End Sub
The problem is that I have another macro that I use to copy information
from the copied worksheets to and from another worksheet (budget). When the
master is copied, the reference remains at 'new'. I have tried just using
Sheet2 as a reference but this won't work as I need to create lots of copied
worksheets (therfore the worksheets will be constantly moving) and I will
need to use the budget macro in each worksheet at different times. Here is
what I currently have (created using recording macros - I really am a VBA
amateur).
Sub gotocalc()
'
' gotocalc Macro
' Macro recorded by
'

'
If Range("m24").Value < "Required" _
Then
Application.ScreenUpdating = False
ActiveSheet.Unprotect
Sheets("calc").Visible = True
Sheets("Calc").Select
ActiveSheet.Unprotect
Sheet2.Select
Range("c5").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Calc").Select
Range("B5").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Sheet2.Select
Range("I5").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Calc").Select
Range("B6").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Sheet2.Select
ActiveWindow.SmallScroll Down:=-6
Range("D18:E18").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Calc").Select
Range("B7").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Sheet2.Select
Range("D20").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Calc").Select
Range("B8").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Sheet2.Select
Range("q23").Select
ActiveSheet.Protect
Sheets("Calc").Select
ActiveSheet.Protect
Else
MsgBox "Budget has not been received from service - budget calculator
cannot be created. If budget has been received enter date"
Range("m24").Select
ActiveSheet.Protect
End If

End Sub

I hope this makes some sense. Thanks heaps in anticipation
Janelle
 
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
Excel Updating Information Revised JohnM New Users to Excel 2 August 3rd 07 04:42 PM
Macros copied to new PC won't enable Piri Setting up and Configuration of Excel 6 March 30th 06 11:48 PM
macros not updating Mark Excel Worksheet Functions 0 January 24th 06 03:45 PM
Formatting information copied and pasted from the WEB to excel jbsand1001 Excel Discussion (Misc queries) 5 April 5th 05 09:07 PM
When updating a worksheet, how do I create a link updating the sa. Phlashh Excel Worksheet Functions 9 January 27th 05 06:05 PM


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