Excel Macros To Zoom In And Out Shapes

Aug 10, 2014

I am struggling to get a macro code for zooming in and out the shapes. I have a macro which fulfill half of my requirement. By assigning the below macro to the shape I am able to increase the current size to double by clicking on the shape however I need the same macro should retain the original size upon second click.

Here is my code to increase the size.

[Code] .....

"The requirement: Once after assigning the macro, on first click it should double the shape size and on second click it should retain the original size."

View 5 Replies


ADVERTISEMENT

Zoom Level Affects Shapes Positioning

Jun 30, 2008

Sub CreateRectangles()
X = 1
Do Until ActiveCell.Offset(X, X).Value = 0
X = X + 1
Loop
variable = Round(-0.026 * (X * X * X) + 0.56 * (X * X) + 24.7 * X + 5, 0)

Set Box = ActiveSheet.Rectangles.Add(ActiveCell.Offset(0, 0).Left, ActiveCell.Offset(0, 0).Top, variable, variable)

With Box
.ShapeRange.Fill.Transparency = 0.3
.Font.Size = 18
.Font.Name = "Trebuchet MS"
.Text = ActiveCell.NoteText

End With

End Sub

View 3 Replies View Related

Zoom In By Using The ActiveWindow.Zoom Control

Nov 28, 2008

I know you can predefine the level of zoom you want by using the ActiveWindow.Zoom control. I'm trying to find some code to Zoom in by a particular percentage. For example +10% zoom, so if you are currently on 90%, excel zooms to 100%, click again and then get a zoom of 110%.

View 3 Replies View Related

Creating Shapes (Rectangles And Shapes) From Input Cells?

Aug 30, 2013

Im trying to create shapes Rectangles and Squares with different colours within an excel sheet, where the length and height of the shapes is generated by input values.

Also is it possible to create 3D shapes, again where the size of the shap is generated by input cell values.

View 1 Replies View Related

Excel VBA To Save PPT Shapes As PNG Images

May 29, 2014

I have an Excel (.xlsm) that opens an existing PPT and uses VBA to modify several slides.

There are several shapes on each slide and my .xlsm has VBA that modifies those shapes.

(The slides have designs on them for different size business cards which get filled in with spreadsheet names,...)

Now I want to "select all" the shapes on a slide as a "group"(not sure that term is correct). Then I want to export that group as a .PNG image file. Save location can be the same folder location of the .xlsm file (doesn't really matter).

This is different than exporting each slide as a .PNG.(which I can already do). In this case the business card designs on each slide are different sizes. So I need the images to be just the size of the "group" on that slide.

The VBA code is within the .xlsm file (not the PPT)

Several posts show VBA code for within the .pptm file that works fine if using just a PPT

However that code doesn't seem to work when I put it in the .xlsm file to drive the image creation from Excel.

PC with latest of all software.

View 1 Replies View Related

Number Keyboard In Excel Shapes?

Jun 7, 2014

I would like to use Shapes in excel, instead using userform as the code below.In this userform, it has command buttons for the numbers and the a text box to show the numbers.How can I do it, using square shapes for numbers and another rectangle shape, to show the written numbers.I would like to create a number keyboard using "shapes".

[Code]....

View 2 Replies View Related

Excel Shapes And Mouse Rollover

Jul 25, 2014

Is it possible to create a piece of VBA that displays a comment box when a user rolls over a specific shape in Excel?

View 1 Replies View Related

Rotating Group Of Shapes In Excel VBA

Feb 4, 2014

I did use the solution in a thread by Andy to make a picture or shape rotate. It works perfectly as a standalone. With this I mean all the information on the same sheet as per example in the file 901259.

I'am using it to rotate a dial. The problem is instead of using the value from the sheet itself I link the scrollbar to a cell on a different sheet in the same workbook. There some calculations are done and the value which makes the dial rotate is linked to that sheet. The dial however is on another sheet.

The calculations are almost displayed realtime but the dial is lagging. How would I go about to "solve" this lagging.

View 6 Replies View Related

VBA Code - Creating And Moving Shapes In Excel

Mar 9, 2014

1.) Create shapes (customize oval shape), I was able to create one but I think the code needs improvement to have the shape a fixed name. - see attached excel file.

2.) Move shapes into corresponding cell. Example: (Oval shape1, should be in cell g6). - see attached excel file.

Customize Heatmap creation.xlsm

View 1 Replies View Related

Smart Generation Of Coordinates For Excel Shapes VBA

Sep 5, 2013

I'm using Excel to create a flowchart from a configuration sheet. I'm not manually entering the coordinates. Instead, I draw the start step in a set location. The next step(s) that's connected to the first step is placed directly below the start step. if there's more than one step connected to the start step, it's placed at the same y-coordinate but shifted along the x-axis.

The problem I'm running into here is this: say I have three steps connected to the start step and three further steps connected to the first of the three connected to the start step, how can I keep track of this and shift the other two steps connected to the start step along the x-axis so they're not positioned above the four steps below the first step (and as such, in the same location as other steps)? I'm not sure if my description is particularly clear or not so I've attached a drawing that will hopefully clear things up.

Is there any way of giving Excel shapes a "weight" so that other shapes won't line up on top of them?

View 3 Replies View Related

Excel 2007 :: Add Shapes In Range Of Cells To ShapeRange

Feb 3, 2012

Using Excel 2007.

I have shapes in 3 different rnages of cells on a cell worksheet:
R1 = $D$5:$D & lngRows (row=32)
R2 = $G$5:$G & lngRows (row = 51)
R3 = $M$5:$M & lngRows (row = 50)

I need to set the properties of the shapes in each range differently The shapes in R1 are Left + 46 But the shapes in the other 2 ranges need to be just left My problem is in this bit

Code:

'Set properties for each shape in ShapeRange
For Each sh In ws.Shapes

I need to be able to set properties for each range separately instead of the entire sheet. Full code below (only Range $D at the moment - works)

Code:

Option Explicit
Sub AddShape3()
'Purpose: Add small rectangles to database table/fields for
' brainstorming and documenting relationships and queries
'
'Resources:

[Code]....

View 2 Replies View Related

Excel 2007 :: Change Text In A Group Of Shapes?

Jun 22, 2012

Ii have a UserForm with a ComboBox in it. the selections in the box are

0
5
10
15
20
25
30

I have 7 shapes in Worksheets("Interface") and renamed each shape caution1 through caution7

What i need is when i click on continue in my userform each shape will change according to the selection.

if 5 is selected all caution shapes will read, Caution flag is out 5 minute break
if 10 is selected all caution shapes will read, Caution flag is out 10 minute break
if 15 is selected all caution shapes will read, Caution flag is out 15 minute break
and so on

excel 2007 btw

View 3 Replies View Related

Excel 2007 :: Default Settings For Drawing Shapes?

Jun 14, 2013

how to change the default settings for shapes in Excel 2007? I select a line tool and it is a blue color and I would like to have its default as black

View 6 Replies View Related

How To Run Macros Without Excel

Jul 15, 2014

I am currently volunteering for a small organisation. I have spent the last week designing a userform to be used by other staff members in their office. However, when I asked the manager 'Do you have Microsoft Office?', I got a very firm and definite 'yes' in response.

It turns out they are using LibreOffice, which is a free alternative. I have also tried to get my userform to work with Open Office - but cannot seem to get either to work.

I have changed the settings in both suites of software to 'Load/Save Basic Code' and enabled macros to run via the security options.

My userform is not that complex. I have limited knowledge of VBA and zero experience using Basic, so have come up stuck.

View 2 Replies View Related

Custom Zoom Set At 90

Dec 23, 2008

If I send a workbook out with the zoom set at 90...will the zoom be at 90 when others open it.? Also, is there a worksheet event that I could insert to force a specific worksheet to always open with the zoom at 90??

View 2 Replies View Related

Defualt Zoom

Jul 31, 2008

Im using Excel 2007

How do i change the default zoom that excel views documents? Whatever view the last person saved the file as it opens in that zoom. I want it to open 75% zoom no matter what anyone saved the files as.

View 9 Replies View Related

Macros To Convert PDF To Excel

Oct 20, 2011

I need a macro, to convert pdf to excel. This pdf file has columnar data, if it could be converted into in the same format.

View 1 Replies View Related

Running Excel Macros On Mac?

Mar 18, 2013

I currently use an Excel program (with macros) that run weather forecast data. It is compatible with versions XP, 2003, 2007 and 2010. However, I am trying to figure out if I can run it on a Mac. My plan is to run windows on my Mac through Parellels or VMWare Fusion.

Here is a link to the Excel Program: TX Tornado Forecast Worksheet

View 2 Replies View Related

Distributing Excel Macros

Jun 9, 2007

I have a number of sheets that have sheet macros that are identical.... i am changing the sheet macro in 1 and want to see if there is an automatic way to distribute it to the other sheets automatically.

View 9 Replies View Related

Copy Zoom To New Sheet

Jan 22, 2009

I have a sub that copies worksheet to a different blank sheet in a different work book. Is there a way for me to set the zoom value on the 2nd sheet (the one being copied to) the same as the 1st sheet?

View 3 Replies View Related

Screen Zoom For A Workbook

Jan 24, 2013

I have just run into the situation where some users, magically and overnight , have widescreen monitors. This means the screen designs for 4:3 monitors show way too much on 16:9 monitors. I would like to put a control button on the opening page that gives them a choice of zoom, which usually seems to be 100% and 135%.

I'm thinking probably an IF sequence to parse their response and execute the appropriate zoom. But how can I make it effective for all the sheets in a workbook?

View 9 Replies View Related

How To Zoom Sheet Particular To 80% Using VBA On Closing

Mar 21, 2013

When user close the file, I want to make sure certain sheets can zoom to 80%. How can this be done using VBA?

View 1 Replies View Related

Zoom To 120 When Any Workbook Is Opened?

May 13, 2014

I am looking for a way to have Excel zoom to 120% whenever any workbook is opened. (My boss has poor eye sight...)

I set up a simple Macro

Code:
Sub Auto_Open()
ActiveWindow.Zoom = 120
End Sub

but I get an error that says "Run-time error '91': Object Variable or With block variable not set.

View 1 Replies View Related

Code To Open WS In 70% Zoom

Nov 16, 2006

I could need a code (WS code I assume) that open the sheet in 70% zoom every time I open that sheet. For now I get in 75% every time I open it. I guess that WS code will bypass that default setting, or bug, or what ever resets it 75%.

View 9 Replies View Related

Center On Zoom In A Frame

Jul 15, 2006

I am developing a form for emergency dispatching. One of the features of this dispatch sheet is that there are several maps in it that open on a seperate form. The map form has 4 maps that are picture files in an image. these images are in a frame. The different images are selected using option buttons. Given the background above, my problem is this. I have code that zooms in 50% each time the Click event for the image is fired. wht i am trying to do is make the zoomed view center where i clicked. this is the code that i have so far but it doesn't work all that spectacular, the closer I zoom in the further out of center the place i clicked gets untill it is out of view.

Private Sub Layout_MouseMove(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)
CurrentX = X
CurrentY = Y
End Sub

Private Sub PlantLayout_Click()
If Frame1.Zoom < 400 Then Frame1.Zoom = Frame1.Zoom + 50
frmmap.Frame1.ScrollLeft = CurrentX - (Frame1.Width / 2)
frmmap.Frame1.ScrollTop = CurrentY - (Frame1.Height / 2)
frmmap.Repaint
End Sub

View 2 Replies View Related

Zoom Worksheets To Fit Used Range

Aug 28, 2007

to apply a zoom to Fit Selection on all worksheets upon file opening? I've read many posts on this and understand how to apply this via worksheet activation, but haven't discovered how to make this to happen to all worksheets when the file is opened.

Zooming the selection needs to happen in the workbook module due to additional sheets being added at random and because it will facilitate the flow of the meeting so that we don't have to wait for the user to select and zoom.

Private Sub Workbook_Open()

Dim ws As Worksheet
For Each ws In ActiveWorkbook.Sheets

LCol = Cells. Find("*", Range("A1"), xlFormulas, , xlByColumns, xlPrevious).Column
Range(Cells(1, 1), Cells(1, LCol)).EntireColumn.Select

' Need code help here to apply to all worksheets
ActiveWindow.Zoom = True ' this works for the worksheet activation event only

Next ws

End Sub

View 5 Replies View Related

Adjust Zoom With Scroll Bar

Feb 21, 2008

I've used various "zoom" searches and can't find what I need. My users have different amounts of toolbars so the amount of screen space changes. I need to zoom so 4 graphs show. Am looking to enable the user with a scroll bar where the user could click / slide the control to change the zoom size on the screen so they can see the 4 graphs at their preferred "zoom".

I would prefer a control on the sheet and link it to a macro (or line of code if that's the proper phrase) and let the user decide (some people will want bigger zoom due to eyesight etc).

Private Sub ScrollBarZoom_Change()
ScrollBarZoom.Value = ActiveWindow.zoom.Value
End Sub

But I get Runtime error '424': Object required. Auto Merged Post Until 24 Hrs Passes;Nevermind. I found it. Answer was:

Private Sub ScrollBarZoom_Change()
ActiveWindow.zoom = ScrollBarZoom.Value
End Sub

View 2 Replies View Related

Excel 2007 :: Macros Enabled But Will Not Run?

Oct 27, 2010

I have an excel file saved as macro-enabled that is perfectly functional and can be opened on my computer (via Security Warning - Enable Macros). The file is saved on another computer, through which I am accessing by a network.

This other computer is unable to run the macros, and when we open the file in excel there is no security warning that pops up (like there is on my computer). I have gone to the Excel Options and entered the trust center settings, and finally the Macro Settings. It is set at Disable all macros with notification. (same for both computers... but on one of the computers there is no security warning that pops up)

We tried enabling all macros (temporarily) and tried re-opening the file and running a macro. We got an error message saying that macros were not enabled.

We also made the file a trusted location and saw no changes.

View 7 Replies View Related

Sorting Excel Data Using MACROS?

Feb 18, 2014

I have a large excel file with the following columns:

unique ID | Date | Time | D or N | Open | High | Low | Close | Volume

I would like to figure out how to create a table showing:

Date | Highest High of the Day | Time the High occurred | Lowest Low of Day | Time Low Occurred

I think this can be done in a macro where I sort first by the Date column then By the High column but I can't figure out how to get the rest.

View 2 Replies View Related

Excel Macros Email Automation

Mar 2, 2014

I am new to excel macros and writing automation code....I work for a company that sells special permits and so far i have written a macro to bring up a pop up box when a permit has expired but i also want to be alerted by email, how can I do this, also is there anyway to stop the macro from running once it finds all of the expired permits? I usually press ctrl + break....

I have attached the file to this post : Book1.xlsm‎

View 14 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved