Hardware Man
New Member
- Joined
- Apr 10, 2013
- Messages
- 40
As the title of this post suggests, I'm trying to use VBA to write some data into another workbook. I did some looking on the internet and this is what I've found. This code doesn't crash, but it sure as heck isn't writing the data to anyplace where I'm expecting it!
Not sure what bearing this has on the case, but the 2 workbooks in question are in different folders. Also, the folders they are in are not just on my harddrive, but are uploaded to the cloud onto my OneDrive. Does this have a bearing on naming the file path? Thanks in advance!
Not sure what bearing this has on the case, but the 2 workbooks in question are in different folders. Also, the folders they are in are not just on my harddrive, but are uploaded to the cloud onto my OneDrive. Does this have a bearing on naming the file path? Thanks in advance!
Code:
Sub MYTest()
Dim mastWorkBook As Workbook
Set mastWorkBook = Workbooks.Open("1 New Master Amazon Report.xlsm")
mastWorkBook.Sheets(24).Cells(2, 4) = "test string"
End Sub
Last edited by a moderator: