Need a Little Help

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
 
T

Tom Ogilvy

File1 exists
File2 needs to be created (but what it will or could contain is not stated)

but you want a macro that copies from File2 (which doesn't exist).

Not sure what comment format is unless you mean you want your data to all be
text.

For me at least, you problem is too ill defined to attempt to suggest
anything.
 
A

alexm999

File2 exists and is called 'Deviation' and file1 is called 'Evaluation'

In cell A1 from file2, i'd like anything in that cell to be copied o
moved to cell B2 in file1.

Both workbooks will be open
 
T

Tom Ogilvy

workbooks("Evaluation").worksheets("Sheet1").Range("B2").Value = _
workbooks("Deviation").Worksheets("Sheet2").Range("A1").Value
 
A

alexm999

OK, thats the step in the right direction.
Now, i'm almost there...
When you right click on a cell, you are given an option to enter
'Comment' for that cell. Im trying to copy something from one workboo
into another workbook comment.

ANy 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) & ""

I'm having dificuly copying and pasting into the comment field..
Can you help
 
T

Tom Ogilvy

Dim sVal as String
Windows("Deviation.xls").Activate
Range("C1").Select
sVal = Selection.Text
Windows("EVALUATION.xls").Activate
Range("M9").AddComment
Range("M9").Comment.Visible = False
Range("M9").Comment.Text Text:="Alex:" & Chr(10) _
& "" & sVal
 
D

Dave Peterson

See one more response at your other post.

alexm999 < said:
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). I
need to create another file that will have "text" information that
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 File2
and put it in File1.

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

Can anyone help?
 

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