Need Help With Files

A

alexm999

I'm not sure if this is the right forum, but here goes:

I have an excel file that runs several macros (lets call it File1).
need to create another file that will have "text" information tha
depends on the day of the month (lets call it File2).

I'd like to create macro or VB script that will copy data from File
and put it in File1.

Even better and heres my ultimate dream: when the data in file2 goes t
file1 it is in 'Comment' form...

Can anyone help
 
A

alexm999

Here's my code:
Windows("Deviation.xls").Activate
Range("C1").Activate
Selection.Copy
Windows("EVALUATION.xls").Activate
Application.CutCopyMode = False
Range("M9").AddComment
Range("M9").Comment.Visible = False
Range("M9").Comment.Text Text:="Alex:" & Chr(10) & ""

How do i copy text from one cell in the deviation.xls file and paste i
as a comment in the evaluation.xls file
 
P

PegL

Instead of Selection.copy, set a variable to the value of
C1 in Deviation. Then set the comment text in Evaluation
M9 to that variable.
 
D

Dave Peterson

This might get you closer:

Option Explicit
Sub testme()

With Workbooks("evaluation.xls").Worksheets("sheet1").Range("m9")
.ClearComments
.AddComment _
Text:=Workbooks("deviation.xls").Worksheets("sheet2").Range("a1").Text
.Comment.Visible = False
End With

End Sub

You can pick up the .value (or even the .text to preserve formatting) and just
plop it into the comment of the other cell.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top