Forum Discussion
Mike___
Mar 08, 2023Copper Contributor
Opening another excel file and copy the "specific" visible cell to the current active workbook
Im trying to open another workbook with a filtered columns and copy a visible cell on a specific columns but the code keeps pasting the value to the "first" last row used by the first visible cell th...
ecovonrein
Mar 08, 2023Iron Contributor
Just guessing because I ended up with a lot of egg on my face recently doing something similar. This kind of code is a scoping nightmare. When you write " wsImport.Cells(Rows.Count, "B")..." what Rows.Count do you think you gonna get? I think you would have to write "wsImport.Cells.Rows.Count" and since that is tiresome, may be you do "With wsImport.Cells(Rows.Count, "B")".