Resize And Reposition Excel Workbook Using VBA

Oct 31, 2011

I have a Userform that when opened shows the Excel spreadsheet sitting behind. Is it possible to write code such that when opened the Excel workbook has been sized and re-positioned such that it is effectively hidden under the Userform?

View 2 Replies


ADVERTISEMENT

Excel 2003 :: Reposition Data And Sum Quantity Based On Matching Reference

Feb 15, 2013

I'm using excel 2003 and using VBA I want to convert data from my original data below.

The first row is just to identify the columns below it.

REFR1,REFERENC2,COMPANYNAME01,CURNTDATE,QUANTITY,ITEMNUMBER,PRICE
71723,121222010,EXAPLECOMPANY,2-13-2013,1.0000,MPG TBS01 TB,65.9900
71723,121222010,EXAPLECOMPANY,2-13-2013,1.0000,MPG TBS01 CH,86.5800
71721,121221142,EXAPLECOMPANY,2-13-2013,1.0000,MPG PB01,75.9900
71718,121234503,EXAPLECOMPANY,2-13-2013,2.0000,MPLC001,146.9900
71718,121234503,EXAPLECOMPANY,2-13-2013,1.0000,MPMC001,120.9900
71720,121238748,EXAPLECOMPANY,2-13-2013,1.0000,MPS007,63.9900

To be converted to the following:

"COMPANYNAME01",
"TOTALITEMS","REFR1","REFERENC2","CURNTDATE","0","0.00","0.00"
"ITEMNUMBER","QUANTITY","PRICE","TOTALPRICE",

"EXAPLECOMPANY",
"2","71723","121222010","2-13-2013","0",,"0.00","0.00"
"MPG TBS01 TB","1.0000","65.9900","65.99",
"MPG TBS01 CH","1.0000","86.5800","86.58",

[Code] ..........

The converted output data above can be within the same document or output to a text file.

View 1 Replies View Related

How To Check All Charts In Workbook And Resize Them

Mar 6, 2012

Im looking for a way to check all charts in a workbook, and resize them.

There are two charts per tab, and i would like the first one to sit on cell A1, and the second to start from a25.

So each chart about 25 rows, by 15 columns if possible.

View 4 Replies View Related

Automatically Resize Entire Workbook

Jan 6, 2009

I have a 40+ page workbook that I'm working and I need to print every sheet in the workbook on legal size paper, and each sheet can not be > one legal piece of paper

The macro will cycle thru all the sheets in the workbook, yet it will only adjust the current active sheet. I highlighted where I think my error is in red....

View 9 Replies View Related

Resize Active Window - Increases Height Of Workbook

Jun 7, 2014

I was just wondering if it possible to create a macro that permanently increases the height of a workbook by a set increment

I have several workbooks that i have the code below assigned to

[Code] ......

So when they open they resize to that set size and position. and what ive been doing if i need to resize (which is often) is just adjust the values in the above code.

Not that the way ive been doing it is difficult but i was thinking how great it would be if i could have a macro i could run that permanently adds 9 to the .Height and subtracts 9 from the .Top

View 4 Replies View Related

Reposition The Cursor To Top Of Page

Apr 20, 2007

I know this will probably be a simple thing, but how do I write in code the function cntl Home and then arrow down to take my cursor back to the top of my worksheet?

View 3 Replies View Related

Excel 2007 :: Can't Resize Charts For Printing

Nov 26, 2013

I've prepared an excel file (excel 2007) with some tabs that contains several charts (4 to 6 charts). When I want to print this file, the sheets with the charts on it doesn't print properly. I have set the print area to cover the charts only and then set it to fit on 1 page but the charts will not scale to fit.

I read somewhere that this is an excel bug - is there a workaround for this?

I could resize all my charts smaller but only as a last resort.

View 1 Replies View Related

Excel 2007 :: Resize - Offset And / Or Copy Destination

Jan 29, 2014

I have a NAMED RANGE of data consisting of 4 columns and as many rows as is selected. Name it CompTable1.

I loop through all of the 4 columns of data to format it (as shown below). This snippet is for column 1 of CompTable1 (a public variable as string) and I basically have the same situation for each column of 4 but replacing each respective x in cells.(n,X) & offset(0,-x) to take into account of where I wish the data to go as I loop through. Ultimately 4 (For Next) loops.

[Code] ......

The new range with 5 columns is as follows:
Column 1 from CompTable1 = Column 1 of new range
Column 2 of new range is blank for something later
Column 2 from CompTable1 = Column 3 of new range
Column 3 from CompTable1 = Column 4 of new range
Column 4 from CompTable1 is not used in the new range but is formatted
Column 5 of new range is blank for something later

This certainly works very well and with my amateur VBA status am quite proud of how far I have come in a few months. Is it efficient? Is it free of possible errors? Likely not. I wish to rid myself of the "Select" each cell plaque though maybe using a resize, offset or copy destination operation but can't seem to get it working. Once I do get the data in the new range, I format everything without selecting quite well with my methods described above.

View 1 Replies View Related

Excel 2007 :: VBA Code To Resize Picture In PowerPoint

Feb 14, 2012

So far my VBA will copy my range of cells in Excel and paste them into Powerpoint but I'm totally stuck as to how to resize the image from there. I've tried a bunch of different methods and I get some pretty crazy results but can't seem to punch through to a solution. What I'd like it to do, at the end of the VBA is:

Set the lock aspect ratio to false
Set the Height to 5.5"
Set the Width to 9.83"
Set the horizontal position to .08 from Top Left
Set the Vertical position to .58 from Top Left

I cannot seem to get my save as portion to work at all. I commented it out at the bottom. This is all in Excel and PPT 2007.

Here is what I have so far:

Sub Export_Excel_to_PowerPoint()

Dim ppApp As PowerPoint.Application
Dim ppSlide As PowerPoint.Slide
On Error Resume Next
Set ppApp = GetObject(, "PowerPoint.Application")
On Error GoTo 0

[Code]...

Ultimately the behavior I'm looking for with this macro is to copy a filtered range of cells from Excel and paste it as a picture into Powerpoint (up til this point I'm golden) then resize the image on the slide, save the presentation, then exit PPT.

View 1 Replies View Related

Excel 2007 :: Drawing Textbox Resize Width With VBA

Feb 20, 2012

I'm using Excel 2007 and I am taking the contents of various user entered cells and creating drawing textboxes to display this data using VBA. How would I get VBA to resize the width of the textbox so that the text is displayed correctly in the textbox i.e. there will be variable lengths of text in the cells so I currenly can read the full contents?

View 4 Replies View Related

Excel 2013 :: Resize Built-in Forms And Menus?

Nov 6, 2013

Anyhow, I enjoy the modern convenience of a dual-monitor setup but still find myself struggling with small forms(?) in Excel. For instance I am currently looking at the "Conditional Formatting Rules Manager" which occupies a very limited amount of screen real-estate. The sheet I am working on contains a large number of conditional formats which all use long custom formulas. I am not the original author.

I would love to be able to resize the overall size of the menu and the columns within it but, for the life of me, I can't seem to do so. It would be much easier to be able to see the rule formulas in one glance as opposed to having to go into each one to see the one-character difference. As stated before I certainly have the real-estate to do so.

p.s. I'm using Excel 2013

View 1 Replies View Related

Excel 2010 :: Keyboard Shortcut To Resize Whole Application?

Apr 3, 2014

I need to resize Excel pretty frequently - I need to size the whole Excel app tall and all the way to the left, taking up about a third of my screen - then maximize it - then back to tall and left, etc. I can do it by clicking the "Restore Down" icon in the top right corner, but I can't figure out how to do it using the keyboard.

I've tried Ctrl-F8, Ctrl-F9 and Ctrl-F10, but they all act on individual workbooks within the Excel application. I want to resize the whole Excel application. Does it exist?

View 3 Replies View Related

Excel 2010 :: Pictures Resize When Changing Page Breaks

Jun 11, 2013

I have a user here at my company that is having a strange issue with Excel. When she moves a page break in her document, Excel freezes up, then once it finally makes the change (if it doesn't crash), some (but not all) of the images that are in the document resize to super small.

For instance, she may have 50 rows. Each row contains a column with an image, then a few other columns with product information. Changing a page break may cause ten of the images to become tiny for no apparent reason. Resetting page breaks seems to cause the document to explode, with cells being thrown all over the page into different locations and columns becoming uneven.

When I make the same change on the same document on my system (both using similar specs and Office 2010), this does not happen.

View 1 Replies View Related

Copy Charts From Excel To PPT - Unable To Resize And Format Chart

May 23, 2014

I have an excel which creates PPT from the excel. but the graph pasted in PPT are not aligned and formatted.

By aligned, i mean re-size the graph and paste in a formatted fashion (currently they are overlapping each other)

My entire PPT created is off alignment and formatting. E.g heading are not properly aligned (they are touching the line below) and so on.

View 1 Replies View Related

Resize The Name Box

Jun 20, 2006

Is there a way to resize the name box, the box directly to the left of the formula bar?

View 2 Replies View Related

Resize Every Second Row

May 9, 2007

I am trying to write a code to resize every second row between the range of A5 and A500 (Starting at A5) to 12.75 but am unable to find a simple loop to do this.

View 3 Replies View Related

Excel 2010 :: Close Second Workbook From Workbook BeforeClose?

May 27, 2014

I cannot make this work in XL2010.

I am opening a second workbook in ReadOnly in the Workbook Open and Closing it in the Workbook BeforeClose.

I don't EVER want to save changes on either workbook.

I need to leave excel open as the macro created a 3rd workbook which the user will need.

[Code]....

View 6 Replies View Related

Sharing Workbook And Make Changes On Excel Workbook At Same Time

Jan 23, 2012

Any way that two or more people can share and make changes on a excel workbook at the same time.

View 1 Replies View Related

VBA Last Row With Offset And Resize

Feb 21, 2014

I trying to out together a small script which performs the following:

-Select cell B7 and offset this by 12 columns and one row
-Resize this by 14 columns, then
-Apply the font format to the selected range from the first to the last row

The code below is what I've put together so far, and although this runs without issue, it's not applying the formatting.

[Code] .......

View 14 Replies View Related

Offset And Resize

Jan 11, 2010

I have 3 workbooks, the first one contains the data and the second is the “Table1” containing "Normal records" and the third is the “Table 2” containing only "900 Records". Tables 1 and 2 will be linked to Access…..

Here’s my issue….

From workbook 1, I would like to copy data from certain cells that contain data to Table 1

From workbook 1, I would like to copy data from certain cells that contain 900 service records data to Table 2

In workbook 1, I have identified which information i want to keep by using the following formula,

View 14 Replies View Related

Resize A Range

Sep 8, 2007

I have the following

Cells(c,r) = Range("fa:" & "fa.Offset(0,5)").value

Fa is a code that searches, once it's found something, it then puts that one cell.value into Cells(c,r). it then moves on until the next cell found with the required contence. I need it to put that one cell, and the next 4 columns along side it starting in Cells(r.c)

The problem is, I keep getting a global error. I am sure I have done something like this before, but cannot find it, or remember how i did it.

View 6 Replies View Related

Resize Userform To Fit Screen?

Jul 20, 2013

stretch" the userform to fit the height and width fo the screen. I dont want to simply change the height and width of the userform, i want the controls within the userform to stretch with the userform so that it looks the same, just fullscreen. this is what ive found by googling:

VB:
With Application
.WindowState = xlMaximized
Zoom = Int(.Width / Me.Width * 100)
Width = .Width
Height = .Height
End With

however, this just stretches it to match the width of my screen, but doestn consider the height, so that if i have a widescreen vs a square screen it will cut off the bottom of my userform. It would be great if there was a zoom type featur that zooms the vertical and horizontal dimensions seperately... more like a stretch than a zoom.

View 2 Replies View Related

VBA To Resize Row To Same As Tallest Textbox In That Row?

Jun 6, 2014

I need to make rows expand to fit the largest text box within that row. I found the code below online, it works perfectly on the spreadsheet it came on but it doesn't work on my spreadsheet.

Dim cr As Range
Dim ht As Single
Dim mht As Variant
Dim cn As Integer

[Code]....

View 6 Replies View Related

Scale / Resize Image With VBA?

May 1, 2014

I would like to scale an image to 124% how do I do that

View 1 Replies View Related

Resize And Delete Picture

Oct 18, 2008

1.My macro code to insert picture from C:pictures to worksheet in colum B,but the insert pictue are very big. how can it is automatic resize with autofit in the height of the column B when i click the insert button.

2.I need some code for the delete button. if I need to delete some picture,when the delete button is clicked , the input box prompt for key in the picture name to delete. if i key in the pictue name , eg.pictue2 , so the name of pictue2 in the column A and the pictue2 in the column B is deleted.

View 2 Replies View Related

Range.Resize To An Entire Row?

Apr 29, 2009

Range.Resize to an entire row? I have a range variable:

View 2 Replies View Related

Image File Resize

Sep 9, 2009

i m sending image files via EMail attachment with VBA code. Though the images are 5Mb+ each and when sending 20+ on a 128k upload connection that takes a while. Is there a way that the images can be resized through vba and saved as a new folder. Or send the images to another program and pause the code until the resizing has been done.

View 3 Replies View Related

Resize Print Range To Fit A 4

Oct 14, 2009

I am trying to print a range that falls just outside of a normal A4 size. Is there a way of scaling this range to fit the page. Withough changing the column sizes before printing(each column is diffrent size). Or will i need to load the column sizes into a array and resize for the print then back to original size from array.

View 2 Replies View Related

Resize Range - Macro

Oct 20, 2005

Macro to CHANGE number of rows “3” to a variable range
(end.xlDown) on the macro below.

Sub GotToRangeResizeCopyPaste()

Application.Goto Reference:="MyRange"
ActiveCell.Resize(3, 10).Select
Selection.Copy
Range("OtherRange").Select
ActiveSheet.Paste

End Sub

View 11 Replies View Related

How To Resize Formula Array

Mar 13, 2012

I want to resize a formula array but I am not able to do it.

Here is my code so far :

Thisworkbook.Sheets(2).Cells(3, 1).Resize(lastrowsource - 2, 1).FormulaArray "=IFERROR(INDEX('Sheet1'!$c$1:$c$999999,MATCH(b3&d3,$A$1:$A$999999&B$1:$B$999999,0),1),""Not found!"")"

View 9 Replies View Related







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