Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Excel VBA > Excel VBA
|
Excel VBA Discuss using VBA for Excel programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Excel VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 16th, 2006, 11:51 AM
Registered User
 
Join Date: Oct 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default updating multiple worksheets at once

I am trying to create a couple worksheets that once i add a line into one of the smaller worksheets the larger one is updated.
Example:

[General Sch] [Amy's Sch] [Bob's Sch]
Main smaller smaller

When i update Amy's Schedule I was hoping to find a way to automatically update the General Schedule worksheet. If you have any ideas or need more information i would be happy to provide whatever you need.

Also I’m quite new the excel vba coding environment. Is there any good website i could use to learn the lingo?

Well thank you for your time.
Brian




 
Old October 16th, 2006, 08:25 PM
Friend of Wrox
 
Join Date: Sep 2005
Posts: 812
Thanks: 1
Thanked 53 Times in 49 Posts
Default

Dear Brian

You can use the Workbook and Worksheet events like

Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
    ' Copy the Contents from the Cell to the Main workook
End Sub

or

Private Sub Worksheet_Change(ByVal Target As Range)

End Sub

and copy the cells:

Regards
Shasur



http://www.vbadud.blogspot.com
 
Old October 17th, 2006, 11:05 AM
Registered User
 
Join Date: Oct 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

maybe this is showing that i trully am a beginner with this stuff, but would the code then be to copy to the values
sheet1.cell(1, 2).value = object.target.value

or should i use the copy method

object.target.copy(sheet1.cell(1,2))



 
Old October 17th, 2006, 11:46 PM
Friend of Wrox
 
Join Date: Sep 2005
Posts: 812
Thanks: 1
Thanked 53 Times in 49 Posts
Default

You can use the second method

Something like this should workout

Sheet1.cell(1, 2).copy Destination:=Sheet2.Range("A2")

Make sure that include destination



http://www.vbadud.blogspot.com





Similar Threads
Thread Thread Starter Forum Replies Last Post
Create an Excel Spread with multiple worksheets hewstone999 Access VBA 1 March 7th, 2008 08:21 AM
Search/Update in multiple worksheets VBA code help utalwalk Excel VBA 1 April 19th, 2006 04:42 AM
Splitting Excel file into Multiple Worksheets tvschalapathirao Dreamweaver (all versions) 3 May 16th, 2005 02:16 AM
Updating Multiple Frames f01b032 HTML Code Clinic 1 October 20th, 2004 06:13 PM
Updating multiple Rows from multiple fields in ASP vdm_nana SQL Server ASP 0 April 1st, 2004 04:26 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.