tsatsos007
03-18-2011, 06:23 AM
Hi all!..
the concept of this spreadsheet is to have survey questions in one sheet and record the answers to the other with the PC name as a heading... no worries about the layout..i have it ready. all i want is automatically copy range from one spreadsheet to the other if blank..
Simply in words I want excel to look into one cell ..if it s blank paste special to it but if not paste to the next..or the next...and on..
i am doing many wrong things.. and i got stuck... i think some kind of loop statement and offset would do it... but i m not sure how to use it.. i m learning from ready made codes that i twist here and there.....now i m stuck :banghead:
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
Worksheets("survey").Range("a2:a52").Copy
If IsEmpty(Worksheets("score").Range("a2")) Then
Worksheets("score").Range("a2").PasteSpecial Paste:=xlPasteValues
Active.cell = user
Else
End If
Worksheets("survey").Range("a2").Select
End Sub
by active.cell = user .. i sort of wanted to write on top the name of the user(/PC) ..but i guess this doesn t do the trick?!?
the concept of this spreadsheet is to have survey questions in one sheet and record the answers to the other with the PC name as a heading... no worries about the layout..i have it ready. all i want is automatically copy range from one spreadsheet to the other if blank..
Simply in words I want excel to look into one cell ..if it s blank paste special to it but if not paste to the next..or the next...and on..
i am doing many wrong things.. and i got stuck... i think some kind of loop statement and offset would do it... but i m not sure how to use it.. i m learning from ready made codes that i twist here and there.....now i m stuck :banghead:
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
Worksheets("survey").Range("a2:a52").Copy
If IsEmpty(Worksheets("score").Range("a2")) Then
Worksheets("score").Range("a2").PasteSpecial Paste:=xlPasteValues
Active.cell = user
Else
End If
Worksheets("survey").Range("a2").Select
End Sub
by active.cell = user .. i sort of wanted to write on top the name of the user(/PC) ..but i guess this doesn t do the trick?!?