Back to Browse

Macro Monday Snap Chart to Cells Solution

224 views
Mar 3, 2017
5:46

Grab the Free VBA Quick Reference Guide https://www.chrisjterrell.com/excel-vba-quick-reference-guide/ Have you ever tried to make a chart exactly fit in some cells. In this video, we show you how to make a macro that allows you to do just this. You will only realize how annoying this is after you realize how simple this macro makes it. Code: ============= Sub SnapForm() On Error Resume Next Dim chrt As Chart Dim rng As Range Set chrt = ActiveChart Set rng = Application.InputBox("Select Range", "Selection", Type:=8) chrt.Parent.Top = rng.Top chrt.Parent.Left = rng.Left chrt.Parent.Height = rng.Height chrt.Parent.Width = rng.Width End Sub

Download

1 formats

Video Formats

360pmp49.0 MB

Right-click 'Download' and select 'Save Link As' if the file opens in a new tab.

Macro Monday Snap Chart to Cells Solution | NatokHD