Solved

placing a value on another excel wrk book through vba

Posted on 2012-04-08
2
169 Views
Last Modified: 2012-04-14
i have 2 workbooks
wrkA  and wrkB
what i have is an open workbook wrkA open and running with some code on it
and with the press of a macro button i wish to put a number eg "76767" on wrkB sheet1 position A1
i do not want to run links on the sheet it needs to be through VB
thats it all i need to be able to do i can then work out the syntax from there
0
Comment
Question by:sydneyguy
2 Comments
 
LVL 41

Accepted Solution

by:
dlmille earned 500 total points
Comment Utility
You can do this.  I'm assuming you have to open wkbB:

Sub doWork()
Dim wkbA As Workbook
Dim wkbB As Workbook

    Set wkbA = ActiveWorkbook
    Set wkbB = Workbooks.Open(Filename:="I:\WoronoraForecast\bookb.xls")
    
    wkbB.Worksheets("Sheet1").Range("A1").Value = "76767"
    'wkbB.Close SaveChanges:=True 'uncomment to save wkbB
End Sub

Open in new window

0
 

Author Closing Comment

by:sydneyguy
Comment Utility
thanks for the  help dlmille up and going
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

PaperPort has a feature called the "Send To Bar". It provides a convenient, drag-and-drop interface for using other installed software, such as Microsoft Office. However, this article shows that the latest Office 2016 apps (installed with an Office …
In this article we discuss how to recover the missing Outlook 2011 for Mac data like Emails and Contacts manually.
Learn how to make your own table of contents in Microsoft Word using paragraph styles and the automatic table of contents tool. We'll be using the paragraph styles in Word’s Home toolbar to help you create a table of contents. Type out your initial …
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now