Filename from a range in diff sheet

drew27c

New Member
Joined
Aug 16, 2016
Messages
24
The code below works great if I am on Sheet1, but what if Range("H3").Value is on Sheet2 and I am still on another sheet? Reason is because i want to save as CSV and that will delete Sheet2

Can't seem to get the syntax right

Code:
Worksheets("Sheet1").Activate
ActiveWorkbook.SaveAs Filename:=pathbell & "CountSheet" & Range("H3").Value & "_Installer" & "_07032019" & ".xlsx", FileFormat:=51
 

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.
Use
Code:
Sheets("Sheet2").Range("H3").Value
 
Upvote 0

Forum statistics

Threads
1,223,275
Messages
6,171,121
Members
452,381
Latest member
Nova88

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