saving a dynamic range as a bmp file

bobaol

Board Regular
Joined
Jun 3, 2002
Messages
225
Office Version
  1. 365
  2. 2003 or older
Platform
  1. Windows
Hi, I found the following code to save as a bmp file. It works nicely for saving the range A10 to Q30 as a bmp file. However, my range changes. So, today, it may be Range C22 to J33 or Range T3 to X70, and so on.
This is the code from Mister Excel... http://www.mrexcel.com/forum/showthread.php?t=233108
Sub Macro_bmp_Print_()
SaveRangePic ActiveSheet.Range("A10:Q30"), "C:\MyRangePic.bmp"
End Sub

I have a macro to figure out the beginning range, and I place that value in cell B1. I would place the end range in cell C1. B1 would look like this: C22, and C1 would look like this: J33

I change the above code to look like this, but it did not work. SaveRangePic ActiveSheet.Range("b1".value & "c1".value), "C:\MyRangePic.bmp"

any help is appreciated. thanks in advance.
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
Maybe try this instead:
Code:
   myRange = Range("B1").Text & ":" & Range("C1").Text
   SaveRangePic ActiveSheet.Range(myRange), "C:\MyRangePic.bmp"
 
Upvote 0

Forum statistics

Threads
1,224,514
Messages
6,179,220
Members
452,895
Latest member
BILLING GUY

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