• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Next Visible Sheet

Paulrh78

New Member
Hi,

I am trying to find the next visible sheet with vba and copy a cell reference in that sheet and copy to another sheet. I have a password user form which makes a specific sheet visible to the user, there are also 3 other sheets visible as standard. In the activated sheet I will to copy a cell and paste it's contents into one of the other visible sheets and have had no luck.

Please help

Regards

Paul
 
Hi !​
This forum has no luck as you share nothing : no code neither a workbook attachment !​
Use the Index worksheet property to check if the next worksheet is visible …​
Or restart from here, see in particular How to get the Best Results :​
 
Thanks for the reply, not really what I was looking for, please see attached; effectively when I open the work book it will ask me for a password to unload Angmering, once I have done this what I want it to do is select the newly visible sheet call Angmering and copy the cell c2 to the worksheet dashboard link and paste this into cell c2, this will then pull through the data from the Angmering sheet and subsequently update my table/pivot in the sheet called Key Data.

See file for a better understanding.

Regards

Paul
 

Attachments

  • Model Test - 2606.xlsm
    204.9 KB · Views: 2
You can use INDIRECT formula without any code …​
Selecting is useless, for example ['Dashboard Link'!C2].Value2 = [Angmering!C2].Value2 …​
In case of several ranges, better is to use With statement for a sheet and use for each sheet its CodeName property :​
Code:
    With Sheet2
        .[C2].Value2 = Sheet3.[C2].Value2
'       other ranges here
    End With
 
Back
Top