VBA Spreadsheet - What have I done wrong?

Eifty

New Member
Joined
Oct 19, 2015
Messages
3
What am I doing wrong?
10ok5nb.jpg

2j1o4dg.jpg
 
Last edited:

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
You must first select or activate a sheet before you can select anything on it.
That being said, do you even need that select?
 
Upvote 0
You must first select or activate a sheet before you can select anything on it.
That being said, do you even need that select?

THANK YOU SO MUCH! You are amazing. <3 One more thing? See where 'activecell' is '+1' I want that cell number to be copied to a 'emptyrow1' in 'Enrolment Background'? How would I do this?

Worksheets("Students").Activate
ws.Cells(emptyRow, 1).Select
Worksheets("Enrolment Background").Activate
ws1.Cells(emptyRow1, 1).Value = ActiveCell

Does that seem right or am I missing something again?
 
Upvote 0
THANK YOU SO MUCH! You are amazing. <3 One more thing? See where 'activecell' is '+1' I want that cell number to be copied to a 'emptyrow1' in 'Enrolment Background'? How would I do this?

Worksheets("Students").Activate
ws.Cells(emptyRow, 1).Select
Worksheets("Enrolment Background").Activate
ws1.Cells(emptyRow1, 1).Value = ActiveCell

Does that seem right or am I missing something again?

I've done it! :D Thanks anyway! :) it was:

Worksheets("Students").Activate
ws.Cells(emptyRow, 1).Select
Worksheets("Enrolment Background").Activate
ws1.Cells(emptyRow1, 1).Value = ws.Cells(emptyRow, 1).value
 
Upvote 0
As a test, try removing the first three lines, just leaving:
Code:
[COLOR=#333333]ws1.Cells(emptyRow1, 1).Value = ws.Cells(emptyRow, 1).value[/COLOR]

As far as I can see, there's no reason to keep that entire select/activate section.
 
Upvote 0

Forum statistics

Threads
1,223,270
Messages
6,171,102
Members
452,379
Latest member
IainTru

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top