LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 43
Default Updating data automatically using macro

Hello,

I created a link between two worksheet in the same
workbook using macro. The main worksheet where the data
is entered should update certain columns in another
worksheet.

When the macro is run, it should do the updation
automatically but its not working. Below is the macro
which I created. I really don't know what's wrong with it.

-----------
Sub DailyMOPS()
Application.Goto Reference:="mthProdDateRange"
Selection.Copy
Windows("MOPS.xls").Activate
Sheets("Daily MOPS").Select
Range("A5").Select
ActiveSheet.Paste
Application.Goto Reference:="mthULG97Range"
Selection.Copy
Windows("MOPS.xls").Activate
Sheets("Daily MOPS").Select
Range("B5").Select
ActiveSheet.Paste
Application.Goto Reference:="mthULG92Range"
Selection.Copy
Windows("MOPS.xls").Activate
Sheets("Daily MOPS").Select
Range("C5").Select
ActiveSheet.Paste
Application.Goto Reference:="mthKeroRange"
Selection.Copy
Windows("MOPS.xls").Activate
Sheets("Daily MOPS").Select
Range("D5").Select
ActiveSheet.Paste
Application.Goto Reference:="mthGORange"
Selection.Copy
Windows("MOPS.xls").Activate
Sheets("Daily MOPS").Select
Range("E5").Select
ActiveSheet.Paste
Application.Goto Reference:="mthGO25Range"
Selection.Copy
Windows("MOPS.xls").Activate
Sheets("Daily MOPS").Select
Range("F5").Select
ActiveSheet.Paste
Application.Goto Reference:="mthNaphthaRange"
Selection.Copy
Windows("MOPS.xls").Activate
Sheets("Daily MOPS").Select
Range("G5").Select
ActiveSheet.Paste
Application.Goto Reference:="mth180Range"
Selection.Copy
Windows("MOPS.xls").Activate
Sheets("Daily MOPS").Select
Range("H5").Select
ActiveSheet.Paste
Application.Goto Reference:="mthLSWRCrkRange"
Selection.Copy
Windows("MOPS.xls").Activate
Sheets("Daily MOPS").Select
Range("I5").Select
ActiveSheet.Paste
Range("A5:I30").Select
Selection.Sort Key1:=Range("A5"),
Order1:=xlDescending, Header:= _
xlGuess, OrderCustom:=1, MatchCase:=False,
Orientation:= _
xlTopToBottom
ActiveWorkbook.Save
xltohtml
End Sub
------------------

Please help.

Thanks,
Sheela

 
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
Sum isn't updating automatically with new data entry Paris[_2_] Excel Worksheet Functions 2 August 16th 09 02:36 AM
Data Range updating automatically as new data is entered mgnrke28 Charts and Charting in Excel 1 July 10th 08 02:02 PM
Automatically updating data between worksheets. Gunnar Boykin Excel Discussion (Misc queries) 2 February 4th 08 06:26 PM
Sorting Data & Updating Automatically sabunabu Excel Discussion (Misc queries) 5 January 5th 06 01:18 AM
Updating calculations automatically when i enter in new data chica_guapa Excel Discussion (Misc queries) 1 February 8th 05 10:17 PM


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