Chart Sheets - Resizing And Exporting
Jun 3, 2006
I have a two-parter...
1) Is it possible to write a macro that will resize fonts in a chart (axes, text boxes) to specific sizes?
2) I usually copy chart sheets and paste them into Publisher but I have to resize them because they are huge when pasted. I would like to create a toolbar command that will take the selected chart sheet (not just a chart in a worksheet) and resize it and its components (part 1) to specific dimensions, then copy it as a picture so that I can simply go to Publisher and paste the chart after pressing said button in Excel.
View 9 Replies
ADVERTISEMENT
Mar 26, 2014
My workbook operates in full screen mode simly to make it looks a bit nicer. I have some + - buttons that call a macro to change the scale of the axes of a chart (sort of a zoom effect). For some reason, whenever I run these macros my workbook exits out of full screen mode.
Here's an example of the zoom code:
ActiveSheet.ChartObjects("Chart 115").Activate
ActiveChart.Axes(xlValue).Select
ActiveChart.Axes(xlValue).MinimumScale = 200000
ActiveSheet.Range("a1").Select
View 2 Replies
View Related
Jun 7, 2006
Is there a macro written or a way to write a macro that will take certain excel sheets and combine them to create one PDF? I have the excel add-in that allows a user to export either the entire workbook or a single sheet to a PDF file.
View 5 Replies
View Related
Feb 12, 2010
I expect this may have been done before, I have a workbook with 6 sheets. Each sheet lists a register, each register has between say 12 & 25 column, 1 column in each sheet denotes a "y" for exporting to another spreadsheet (not the same column in each sheet though)
what I would like is some code that will open a new workbook, and copy each of the sheets (all the fields/columns etc) into the new book, but only the lines that have the "y" next to them.
I have codes that export one sheet , but its not really relevant to what i need to do.
View 9 Replies
View Related
Jun 21, 2012
Currently, I have 65536 rows of data per sheet in an excel file. I have a total of 8 sheets. I need to combine all these sheets into one csv file. As my company uses excel 2003, I can't consolidate all sheets into 1 sheet before saving as CSV format as it will exceed the number of rows available in excel 2003.
However, the number of rows and number of sheets in the excel file will change monthly, and I need to consolidate the excel file accordingly.
I am wondering if I could save a new workbook as csv format first before copy and paste all data into that csv file.
Also, all the 8 tabs have the same header. I only need to copy the header on the first tab, and for the sequence tab, I will only need to copy row 2 onwards.
I have recorded a macro based on a sample data.
Sub Macro1()
'
' Macro1 Macro
'
'
ActiveWorkbook.SaveAs Filename:= _
"C:Documents and Settingse31425My DocumentsBook1.csv", _
FileFormat:=xlCSV, CreateBackup:=False
[Code] .......
View 1 Replies
View Related
May 17, 2013
I've been using a script I found on the web to export a book of 15 worksheets so that they are saved into a folder as 15 separate .csv files - these are to then be imported into Adobe InDesign at a later date.
Currently, the code looks like this:
VB:
Sub SheetsToCSV() 'Jerry Beaucaire (1/25/2010)
'Save each sheet to an individual CSV file
Dim ws As Worksheet, OldDir As String
[Code]....
If possible, I would like the sheets to be exported as consecutively numbered files, so that they can be set into the order they are exported in Windows Explorer, rather than alphabetically.
E.g.
Sheet names = Overview, Checking, Testing
.csv export = overview-17.05.2013.csv, checking-17.05.2013.csv, testing-17.05.2013.csv
Goal = 1overview-17.05.2013.csv, 2checking-17.05.2013.csv, 3testing-17.05.2013.csv
I'm not too fussed about the final formatting, as long as the consecutive numbers can be inserted at the start of the string, the rest isn't as important.
View 2 Replies
View Related
Mar 30, 2008
I have received following macro from someone to delete series but the problem is that it gives error when some sheets are protected, and I want those sheets to protected. When run it will ignore/leave protected sheets but delete series only from unprotected sheets
Private Sub CommandButton1_Click()
Dim Rng As Range, i As Long, r As Range, lVal, uVal
Dim DeleteCount As Double
Dim lRow As Long
Dim dr As Long
Dim dc As Long
dc = Sheets("Deleted Numbers").UsedRange.Columns.Count - 1
dr = Cells(Rows.Count, Sheets("Deleted Numbers").UsedRange.Columns.Count - 1).End(xlUp).Row + 1
If dr = 60001 Then ................
View 4 Replies
View Related
Jan 19, 2007
I can't find a way to re-size the name box (the one in the top left hand corner of a spreadsheet, to the left of the formula bar), or change the type size that this box uses.
I've looked through Excel help, but I can only find help on re-sizing toolbars and not the name box.
View 9 Replies
View Related
Oct 13, 2011
I now have 5 textboxes "on top" of one other (i.e. vertically arranged). I would like to - depending on which checkbox is checked - extend the top one all the way down and make the bottom four invisible. I'm pretty sure I can handle the second part:
Code:
Textbox2.visible=False
For example. How to resize a textbox?
View 7 Replies
View Related
Sep 30, 2012
I have table1 that has its original range as A1:B3. Depending on the amount of n in another column, I want table1 to be resized to A1:Bn.
I have tried with
ActiveSheet.ListObjects("Table1").Resize range("A1", "witdh")
with "width" being a variant.
View 9 Replies
View Related
Oct 26, 2013
I am trying to copy down a range of formulae using the resize function. Here's the code I have :-
Code:
Dim no_of_transactions As Long
no_of_transactions = Last_Row_of_data(main_workbook.Sheets("working").Range("g2"))
main_workbook.Sheets("working").Range("w2:ak2").resize(no_of_transactions,1)
However I am told by the vba editor that I need an = sign ? The function Last_Row_of_data tells me the number of rows that I have.
View 4 Replies
View Related
Apr 18, 2006
I have a worksheet named Advisers with a range also named Advisers, the range is a list of names which is added or deleted from by use of a UserForm.
I have the following lines of -
The first populates the worksheet
and
The second is supposed to resize the range Advisers accordingly but it gives a Run-time error I've tried the 2 examples below
c.Offset(0, 0).Value = Me.Adviser_txt.Value
Worksheets("Advisers").Resize(Range("Advisers").Rows.Count, 1).Name = "Advisers"
c.Offset(0, 0).Value = Me.Adviser_txt.Value
Worksheets(Sheet2).Resize(Range("Advisers").Rows.Count, 1).Name = "Advisers"
View 9 Replies
View Related
Aug 2, 2007
= SUMIFS(E9:E1494,C9:C1494,1) This formula works ok. If I rename range E9:E1494 as "Col_1" and change the formula to =SUMIFS(Col_1,C9:C1494,1). I get #VALUE error.
The range is formatted as number.
Also ...
If I delete some cells in a range, referring formulae are modified accordingly, but if I add cells in the range the formulae do not recognize the change
View 4 Replies
View Related
Apr 8, 2008
Is it possible to re-size a non-contiguous range? I'm guessing "no", and a Google trawl hasn't provided me with anything.
Here's what I'm trying to do:
dim mult_rng as range
dim rng2 as range
set mult_rng = range("A1:B1,D1:E1")
set rng2 = mult_rng.resize(rowsize:=10)
That is, my original range is comprised of non-contiguous cells in the same row. When re-sizing, I'm trying to increase the number of rows, but leave the columns the same.
Like I said, my gut instinct says that this isn't possible using the 'resize' property. Can anyone think of another method to use? My constraints are that the original mult_rng isn't always the same (and isn't always non-contiguous).
View 9 Replies
View Related
Jun 3, 2006
i have a command button on a userform that resizes/inlarges a userform.
i need some code to place the new sized form in the centre of the screen once the resizing code is executed.
View 3 Replies
View Related
Jun 7, 2013
I have created this Excel schedule that is attached. The point of the schedule is to organize Jobs and Crew members. I have VBA code in, so when I calculate how long the job should take, the arrows next to the job will automatically extend. (This should all make sense if you take a look at the attachment.) The only problem is that my arrows do not extend the correct distance. In the attached file I have scheduled "James Lorenz" to do a job starting on tuesday, towards the bottom of the page I did my calculation that figures he should be on that job for 9.5 days. I would like the Arrow next to James' job to extend 9.5 days on the calender instead of 9.5 centimeters or whatever it is doing now.
View 9 Replies
View Related
Feb 13, 2014
Lets say i type for now...
A1 = USA
B1 = Philippines
and then later
A1 = dog
B1 = cat
Is there a way that the width would automatically adjust even as I change the values of the given cells; meaning, if a word is long, the width will automatically adjust "longer", if a word is short, then it will automatically adjust "shorter".
I know how the "AutoFit Column Width" works but I don't want to press that every time my values change (words becoming shorter or longer).
View 4 Replies
View Related
May 17, 2014
I finally have the merged cells resizing the way I need, however it seems to lock the cell after the process not allowing it to be edited again until I unlock the sheet. below is the current code I am using
[Code] .....
View 5 Replies
View Related
May 4, 2007
I have made charts in VBA charts that needs to be placed on specific position and have specific sizes on a chartsheet. I use plotarea (top, left, width, height) for that. Unfortunately when I set these values they keep chaning, there is some scaling going on in Excel and they won't get the specified size. I have been looking on the internet and finally I found a piece of code which works, but still not good enough, because the legend is also not good positioned
De data for resizing the new charts (ChtNew), the legends and the charttitle I get from other charts (ChtOrig). The legend.legendposition of ChtOrig does not have a value but it still have a top,left,height en width which I use.
I show you my code, the part with the for-next is taken from the internet.
I am trying to find a solution now for 3 days and now I only dream of huge charts (which is not good). So please can someone help me with this? This is the last forum, that I can try, I didn't get reactions from others.
with ChtNew.legend
.Top = ChtOrig.Legend.Top
.Height = ChtOrig.Legend.Height
.Left = ChtOrig.Legend.Left
.Width = ChtOrig.Legend.Width '* 1.1
.Top = ChtOrig.Legend.Top + ChtOrig.ChartTitle.Top
end with
With ChtNew.Plotarea
.Top = ChtOrig.PlotArea.Top
.Height = ChtOrig.PlotArea.Height
.Width = ChtOrig.PlotArea.Width
.Left = ChtOrig.PlotArea.Left
For i = 1 To ChtOrig.PlotArea.Top........
View 9 Replies
View Related
Oct 22, 2013
I have a sheet open that I would like to have a chart like...umm...floating in front of?
First off I want the same "chart" (or block of cells) to be on all sheets of my file so if I enter information into it on one of the sheets it'll be the same on all of them. That's the most important part.
The other thing I'm looking to do with it is I would love for it to remain stationary when I scroll up and down on the sheets. So basically the left half of my screen would scroll up and down but the chart on the right would stay put in my line of vision no matter how far down I scroll.
View 9 Replies
View Related
Dec 27, 2006
I created a chart with F11. It becomes the first, well, "sheet" in the workbook, Chart1. It's active when I go
Function foo()
Dim wksht As Worksheet
For Each wksht In Sheets
Boom. Now what do I do? I can't just go activesheet.next.select in error trapping code - can I??!!
View 9 Replies
View Related
Aug 8, 2007
I'm currently working on a workbook that has over 50 different sheets. On each sheet there is a column K that I want to graph if desired. From the Main sheet I would like to have checkboxes or something, so that when I press on it, the data from sheet x is added in the graph. Can this be easily done? It's not a problem to hardcode the which-button-calls to-which-sheet (just takes some time), the main thing I cant work out, is how to add a series to a chart, how do delete a series from a chart and so on..
View 9 Replies
View Related
Jan 5, 2008
Sub Macro1()
Sheets("AllSheets").Select
Charts.Add
ActiveChart.ChartType = xlLineMarkers
ActiveChart.SetSourceData Source:=Sheets("sheet2").Rows("48:48")
ActiveChart.Location Where:=xlLocationAsObject, Name:="sheet2"
ActiveSheet.Shapes("Chart 7").ScaleWidth 1.79, msoFalse, _
msoScaleFromBottomRight
ActiveSheet.Shapes("Chart 7").ScaleHeight 1.01, msoFalse, msoScaleFromTopLeft
ActiveSheet.Shapes("Chart 7").ScaleWidth 1.09, msoFalse, msoScaleFromTopLeft
ActiveSheet.Shapes("Chart 7").ScaleHeight 1.01, msoFalse, msoScaleFromTopLeft
End Sub
i need the chart to be inside allsheets. currently it create a new sheets chart1 once i generate it.
View 9 Replies
View Related
Jul 19, 2008
I would like to hide all worksheets and chartsheets in a workbook. I use
For Each sh In Sheets
sh.Visible = xlSheetVisible
Next sh
but I think it breaks down for chart sheets. Any solutions?
View 9 Replies
View Related
Jun 30, 2006
I’m would like to delete some sheets in my workbook using a macro. The problem is that
I won’t know in advance the name of these sheets.
I was thinking using a code like the following one to delete the sheets but the problem is that Excel expect a sheet name at this part of the code since it is expecting the sheet name.
Sub Delete_Active_Diagram()
Application.DisplayAlerts = False
Dim i As Integer
Dim strSheetName As String
Dim blnFound As Boolean
strSheetName = "Average Sales Per Week" & "" & Sheets(i + 1).Range("C3")
i = Sheets.Count
For j = 1 To i
If Sheets(j).Name = strSheetName Then
blnFound = True
Exit For
End If
Next
If blnFound = False Then Exit Sub
If blnFound = True Then strSheetName.Delete
End Sub
Is there a way to cope this problem, or should i think about another way to do it. Like selecting each sheet I would like to delete and then delete the selected sheets.
By the way. All the sheets I try to delete a Charts Sheets. Maybe there is a way to delete all the charts in my workbook.
View 5 Replies
View Related
Jun 7, 2006
create a form that will look at the spreadsheet and figure out which of the 32 possible checkboxes will be used and resize accordingly. I can make it so that only the checkboxes I want are visible using the .visible property, but for the sake of aesthetics I'm wondering if there is a way to disable the checkboxes I don't want and to resize the form to fit the checkboxes I do want. I just don't want a form that looks like it has checkboxes put on it at random spots.
View 3 Replies
View Related
Mar 22, 2009
I want to do is be able to take The data from one week for every store and compile it into a chart to show a summary of the company as a whole. I know that I can reference from that chart to each worksheet the values I want, but how would I give that chart the ability to update each time I add a weeks worth of data.
I have attached a file that shows what I am talking about. The sheets labeled Waterloo, Mogadore, through Green are the sheets for each store.
I want to take the last weeks data and put it into a chart as seen on Sheet1. Then when I add data for 3/21/09 I want to make a new chart without retyping the data into the chart.
View 2 Replies
View Related
Jan 3, 2009
I want my charts to be located in a new sheet each. I also need their names to start with "GR-Chart[number here]". So they should be GR-Chart1, GR-Chart2, GR-Chart3,......
ActiveChart.Location Where:=xlLocationAsNewSheet, Name:= "GR-Chart" & [this part I got wrong]
Do I use i? or .Count?
View 9 Replies
View Related
Jan 31, 2013
Ive been trying to find a way of inserting a picture into a defined merged cell. Once I insert the pic I would like it to auto size/fit into the merged cells.
I have only managed to do this by either resizing the pic's first, or running a retro macro to resize the image. Just wondering if there was an easier way?
View 4 Replies
View Related
Sep 10, 2013
how to stop rows resizing with text which paste into cells
View 1 Replies
View Related