Hello everyone, My name is Naveen.
I wrote a code to collect data from multiple sources using userforms. My code is working on almost 85% to 90% of the audience's computers but giving me the above mentioned error on 10%-15% of the audience.
Code:
Set NewBook = Workbooks.Add
NewBook.SaveAs Filename:=loc & "" & surveyfilename, FileFormat:=xlWorkbookDefault 'loc is a variable for location.
Windows(nam).Activate 'nam is name of file I am copying from
Worksheets("Storage").Activate
Range(Cells(1, 1), Cells(1, 1175)).Select
Selection.Copy
Workbooks.Open Filename:=loc & "" & surveyfilename & ".xlsx" 'new file I just created
Workbooks(surveyfilename & ".xlsx").Activate
ActiveSheet.Paste
ActiveWorkbook.Save
ActiveWindow.Close
It shows my error is in ActiveSheet.Paste line.
Thanks in advance.
Bookmarks