VBA Code for Saving Excel file as "Values and formatting" without formulas, and "under specific cell names"

hari14

New Member
Joined
Aug 10, 2016
Messages
3
I am new to this Forum and I Need some help with VBA codes.
I am completely new to VBA and Macros. All i know now is to insert ActiveXcontrols and enter the code.

Please help me withe the following. I would like to have a code with Private Sub CommandButton1_Click()
I have an Excel file with a lot of formulas and protected cells.

All I want is to save a copy of Excel file as "Values & Number formatting" Only in Desktop under a specific cell Name from Cells H4, H5 & D4.

Thank you very much in advance!!


PS: Please give me a code in this Format.
Private Sub CommandButton1_Click()
End Sub

:confused:

Thanks :)
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
Re: VBA Code for Saving Excel file as "Values anf formatting" without formulas, and "under specific cell names"

No to sure if you can convert everything at time of save hari, will be interested if you can, others will be better placed to answer.

However if not, you could use the macro recorder to record the action of selecting the whole sheet (as in ctrl a and a again, rather than just active range), copy and paste special (values and numbers), repeat for all sheets as needed etc, then save as.

This would achieve the same thing, and you can tweak code for the save name etc as needed.

Can't give you code, I'm on a tablet, but the macro recorder is your friend.
 
Upvote 0
Re: VBA Code for Saving Excel file as "Values anf formatting" without formulas, and "under specific cell names"

Thanks Upex.

I will try this.
Unfortunately, recordning macro does not work as per the requirement mentioned above.

Hope someone can help me out.
Thanks :)
 
Upvote 0
Re: VBA Code for Saving Excel file as "Values anf formatting" without formulas, and "under specific cell names"

Hey Guys, I am still hoping that someone can help me out :)
Thank you!!
 
Upvote 0

Forum statistics

Threads
1,217,488
Messages
6,136,931
Members
450,033
Latest member
germani40

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