Originally Posted by
JON_ROCKS
I thought it was quite straight forward but i guess i can elaborate a little more?
I want to copy from for example the Blank rota tab b18:h19 and past it in the current worksheet at the click of a button on the active sheet using vba, as the tabs go up each week i want to be able to copy generic data from blank rota to the newest tab i selected.
is this possible?
of course. your file has plenty of modules and code already in it. did you write all of that? all you need to do here is use the RANGE() object in code. select the range, copy it and select the cell on the worksheets of choice and paste in it in your desired place. when you insert a NEW tab, regardless of where it appears on the bottom of the screen in the list of worksheets, it automatically becomes the upper bound index number of the worksheets collection, I believe. thus, to point to it, this code should work:
keep in mind, VBA is not the greatest language in the world, certainly not like Python, so some interchangeable code (e.g. - statements that can be written more than one way) sometimes don't work the same. you can thank microsoft for that. (sigh)
Bookmarks