Hi guys
I need a script
that copy for example colorIndex=23(blue) cell form one document to another document on the same place ?
the script need to check so its exact on the same place
Could someone help me out?
Thank you in advance.
Hi guys
I need a script
that copy for example colorIndex=23(blue) cell form one document to another document on the same place ?
the script need to check so its exact on the same place
Could someone help me out?
Thank you in advance.
Attaching a sample workbook enables others to work on your problem:
To attach a sample workbook. Make sure there is just enough data to make it clear what is needed. Include BEFORE/AFTER sheets if needed to show the process you're trying to complete or automate. Remember to desensitize the data.
Click on GO ADVANCED and use the paperclip icon to open the upload window.
View Pic
I made this code so far.
the problem is I need to specify sheet I want the script to check for the sheetname in the filename of the target file the script compare.
also if there is a certain cell copy and paste.
Sub copybetween()
Dim myPath As String
myPath = Application.GetOpenFilename
If myPath = "False" Then Exit Sub
Dim TargetBook As Excel.Workbook
Dim TargetSheet As Excel.Worksheet
Dim xlThisSheet As Excel.Worksheet
Set TargetBook = Workbooks.Open(myPath)
Set TargetSheet = TargetBook.Worksheets("jeeves")
Set xlThisSheet = ThisWorkbook.Worksheets("jeeves")
TargetSheet.Range("C3").Copy
xlThisSheet.Range("C3").PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
TargetBook.Close
End Sub
You can edit you post to add code tags,
CodeTags.jpg
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks