Vba Chart Axes Editing Syntax
Jul 12, 2007
my VBA code does some simple editing. Something I would like it to do is make the x-axis and y-axis lines be editable. What I mean is say for editing the Plot area background you would use this
ActiveChart.PlotArea.Format.Line.ForeColor.RGB = RGB(0, 0, 0)
I am looking for the equivalent to do the x and y axis lines.
View 4 Replies
ADVERTISEMENT
Oct 11, 2006
I've got an excel worksheet that contains charts 5-14, each with different max axes on primary and secondary scales. Right now the code below works to adjust the axes, however I have pasted this into a script 10 times, once for each chart with different references to the chart number, the max primary axis and max secondary axis. how I could write the following as a loop so that I don't need to have to repeat this routine in my code?
Sub ChartsBillingsShare()
ActiveSheet.ChartObjects("Chart 5").Activate
With ActiveChart
.HasAxis(xlValue, xlPrimary) = True
.HasAxis(xlValue, xlSecondary) = True
End With
ActiveChart.Axes(xlValue).Select
With ActiveChart.Axes(xlValue)
.MinimumScale = 0
.MaximumScale = Range("Y6").Value
End With.................................
View 4 Replies
View Related
Feb 15, 2007
Im plotting data on a Line-Column 2 Axes Chart which works really well with 4 data series (2 column, 2 Line) but when adding a fifth data series, the fourth disappears from view. I can see its still there cos I can display the values but I cant get the line to appear. The values for the 5th series are also similar to other series values so its not like the chart cant display it....are there limits to the number of series on such a chart?
View 9 Replies
View Related
Feb 23, 2010
I'm trying to create a code that when run hides a selection of columns and defines the minimum and interval value for a chart on the active worksheet. My attempt is assigned to the 'update skills' button at the top of the "GRAPH" worksheet of the attached workbook.
View 2 Replies
View Related
Mar 18, 2014
is it possible to unlock a chart but then disabling to change the source data?
Background: I want the user to be able to add numbers etc. but he shouldn't see the underlying table...
View 2 Replies
View Related
Feb 9, 2012
I am trying to create a simple xy graph in Excel 2010 using dynamic source data.
I have data in three columns.
There are headings on line 2 and the data starts on line 3.
A B C
1.
2. dp ss ff
3 .1 .2 .3
4 .3 .4 .4
5 .4 .8 .7
6 .1 .6 .8
7 .3 .5 .1
8 .5 .4 .4
I want to create an XY chart with C3 to C8 as the X axis (or dynamic to what ever the last data point is) with A3 to A8 as the Y axis (or dynamic to what ever the last data point is).
I have Defined names for C3 to C8 (myXvalues) and A3 to A8 (myYvalues).
I have created a simple XY graph and selected the ranges as normal.
This is =DATA(,Data!$C$3:$C$9,Data!$A$3:$A$9,1)
The page is named DATA
What I am trying to do now is to edit this range to make the range dynamic.Unfortunately I get error messages which ever way I try to edit the range.
I have tried:-
=SERIES('Data'!$c$3,'Data'!myXvalues,'Data'!$A$3,'Data'!myYvalues,1)
=SERIES('Data','Data'!myXvalues, 'Data'!myYvalues,1)
=SERIES(,Data!myXvalues,Data!$myYvalues,1)
=SERIES(Data!,Data!myXvalues,Data!myYvalues,1)
The data range can go from 8 to 30000 hence the need for a dynamic range!
PS: Also, is there any way to create this graph and dynamic source data in VBA. I have tried this with no success.
View 2 Replies
View Related
Jul 19, 2006
I´m writting a macro. It works find until a certain point. When I want to change some outputs of the macro without changing the syntax, it display an error mesage while runing the macro. It says Else without If. Which is quite disturbing because the Else was not creating any problem before. Here is my macro before I changed the conditions (this one work nicely)
Sub Copy_Sheet_Beta()
Set wba = ActiveWorkbook
On Error Resume Next
If IsWorkbookOpened("Projekt.xls", "C:Documents and SettingsfrederikSkrivebordRedd Barna") Then
Workbooks("Projekt.xls").Activate 'In case open, just activate "Projekt"
Else
Workbooks.Open Filename:="C:Documents and SettingsfrederikSkrivebordRedd Barnaprojekt.xls"
End If
Set wb = Workbooks("Projekt.xls")
wb.Activate
If Not SheetExists(wba.ActiveSheet. Range("C1").Value) Then
MsgBox "overall doesn't exist!"
Else........................................
View 2 Replies
View Related
Jun 23, 2014
So I have this given: Screen Shot 2014-06-23 at 3.53.01 PM.jpg and I am trying to fit my data to the graph I have in excel below. There is only one x-axis; suction pressure. However, there y values are dependent on two variables, discharge pressure and outdoor air temp.
How can I make the data on this sheet: Screen Shot 2014-06-23 at 3.53.05 PM.png
dependent on both axes?
View 2 Replies
View Related
Jul 11, 2014
I'm trying to change 115 charts so that the Xvalue axes (Y-axes) will start on the lowest value of my data series. This is what I've come up with so far:
[Code] .....
What is the syntax to set instead of X so that all Xvalue axes is set to the lowest Data series value in individual chart?
View 6 Replies
View Related
Mar 6, 2009
I have the theoretical set:
year $ %
2003 100 10
2004 120 20
2005 145 30
2006 205 40
2007 300 50
Could I make the year the X-axis and make 2 y-axes on the same graph in excel that each datasets would be correlated to (eg. for money it'd be from 0 to 300 while for percent it'd be from 0 to 50)
View 3 Replies
View Related
Apr 18, 2006
For an economics assignment I would like to graph price elasticity with price on the 'y' axis and units on 'x'. I have not found a way to do this in Excel, can someone assist?
View 6 Replies
View Related
Jul 12, 2013
How do I paste the first chart into the second chart but maintain the format of the second chart?
View 2 Replies
View Related
Sep 8, 2009
I made the mistake of creating hyperlinks to files on a server (using the \SERVERNAME convention) without using the "hyperlink base" option.
I've been sufficiently chastened, but the present problem is that I have many such hyperlinks that are now worthless because, when saved, they point to "../../[foldername1]/[foldername2]/[filename]", etc.
Need macro that would replace the first five characters ("../..") of all the hyperlinks on my sheet with //[MYSERVERNAME] ?
View 7 Replies
View Related
Jul 15, 2009
So I am attempting to run a macro that contains some if then statements that will change the text in a cell given certain circumstances. I am having an issue specifying the range in that it begins in cell A2 and it goes to the last data cell in the sheet and no farther. The issue with just selecting a whole column is that if the a cell is blank, it fills it in with no and it leaves me with 65,xxx nos in column A. Attached is the workbook with the sheet the code would be executed on and hopefully what the solution would look like. Also i have attached the troublesome macro I have written.
View 7 Replies
View Related
Jul 13, 2013
Whats the key in editing macros to know that you are not getting compile errors and how do you know when your in VBA which statements are repetitive? Do you always go by the macro recorder?
View 8 Replies
View Related
May 21, 2007
I have imported values from another program. Imported values are in 000:00 form (000 for hours and 00 for minutes). If there is less than 100 hours the value is still not treated as [h]:mm. For example:
029:15
How can I erase the first one or two zeros??
View 9 Replies
View Related
Sep 1, 2008
Is there a way to copy and paste my notes from Word into the text box once it is embedded in the excel worksheet?
View 9 Replies
View Related
Jun 29, 2007
I have two CSV files that I would like to edit through Excel VBA. Both files have too many lines to be shown in Excel though, so I can't just use cell rerences. Every so many lines I want to delete a row and insert a row from one CSV file to the other. I could easily write a loop do this with cell references, but since all the lines aren't shown I can't do that. I have no idea how to reference all the rows in the CSV file with VBA when most of them aren't viewable on the worksheet.
View 2 Replies
View Related
Nov 25, 2008
Im having problem with If/Then/Else Statements Not sure what the problem is. I have a text box a user inputs whatever in to create two new tabs one is the tab name then the next is tab completed. It isnt liking my syntax I have here.
View 7 Replies
View Related
Apr 19, 2007
I have 150 or so workbooks. Each of them are in the same format. I need to edit this format. Bolding, Borders ect. I know you can do this with multiple worksheets but how can do do with with multiple workbooks?
View 12 Replies
View Related
Jul 7, 2009
I am trying to create an asset management database using excel, and would like to be able to add custom notes to each entry (index) so as time goes on, I can refresh my memory what we have done with a particular item. I have attached the current file I have created.
Essentially, when I use the GREEN drop down menu in the top right, I want it to display the notes/comments that I enter in the rightmost column of the data, as the attached file illustrates.
However, I want to be able to hide that rightmost column and be able to edit the data from the new area (white space) it is being displayed in, however as I have it set up right now, if I edit the cell, it edits the forumla and poof goes all the comments and the formula becomes messed up.
View 5 Replies
View Related
Nov 28, 2009
I have a table on sheet 2 consisting of 120 rows and 8 columns, on sheet 1 I have a combo box and have used INDEX to display the values for each row that I select. what I want to be able to do is edit the INDEX data on sheet 1 and then have a button that will replace the old value in the table on sheet 2 with the new value.
View 5 Replies
View Related
Jul 29, 2014
Currently We enclosed a Workbook (with exiting VBA code) In this workbook 3 sheet exit (Edit, Details, Summary)
In Details Sheet store Detail Entry of Invoice & in Summary Sheet we store all generated Invoice details in summary form
We want new VBA or correction in existing VBA.
My Exiting VBA work following..
When Enter Invoice Number in Edit Sheet (Cell B2) then Display Entered Invoice Data
First Code Find Invoice Number in Summery Sheet if Invoice Number found then Record Display of Selected Invoice
Here we Edit As per our requirement then We Press Y in Edit Sheet Cell C30
If Found C30 "Y" & "Data ok" in E30 then DELETE Selected Invoice Data From SUMMERY & DETAILS SHEETS & COPY THIS EDITED DATA (RANGE A33 TO G33 In Summery Sheet & Range A35 to A60 in Details Sheet)
My Exiting code work perfectly as per above
We want only following thing
Currently when we copy edited data that move to end of sheet We want to Change & same place where data exit previously before edited. Because serial number disturb.
NOTE : in Editing Time is it possible Few Item Delete or Few Item Add
View 12 Replies
View Related
Oct 3, 2008
I have some VBA code in an Access DB that opens an Excel spreadsheet at a specific workbook, and then performs some formatting on the sheet, before saving the changes and closing the workbook.
The first time i run the sub it works perfectly. If i then try and run it again i get a run-time error 91 message (Object variable or With Block variable not set). This happens every subsequent time i try and run the code until i manually reset.
The error message is always at the same point. Here's the
I've put ***ERROR MESSAGE HERE*** at the point in the code the error seems to be occuring
View 2 Replies
View Related
Feb 17, 2010
I'm trying to extend the range of a summation formula with a macro.
I've attached a dummy worksheet. I've named each cell in row 8 as well as the summation ranges they are calculating.
I am looking for the result of the macro to have each total's formula range to extend to to row 7 of its respective column.
View 9 Replies
View Related
May 4, 2009
I have a spreadsheet wherein the column g keeps a chronological record of actions taken on a particular issue. Each time there is a new action taken on an issue, I go to the G column of the appropriate row, position my cursor at the beginning of the text already in that field, press CTRL Return twice, Press the up arrow twice and begin typing. I always add the date first followed by a colon,(e.g. 5/4, I bold that date and then position my cursor after the colon and begin typing the update to the status.
It occurs to me that all of the steps leading up to the typing of the issue could probably be autmated in a macro.
View 9 Replies
View Related
Dec 6, 2004
I'm designing a custom toolbar in VBA and have managed to create a toolbar with buttons.
However, I've been battling away trying to edit the buttons images so that I can design the button image to match the nature of macro assigned to it. The problem is that if you record yourself doing it, the macro written in VBA doesn't seem to recognise the editing button actions.
Does anyone out there know of a way to custom edit a button image in VBA?
View 9 Replies
View Related
Dec 9, 2006
I recently added two excel files to my startup, I receive the file in use error that the personal.xls is locked for editing box when the second file starts to execute. I can open them separately using their icons with no problem, what's the problem with opening them using the startup function. XP professional version 2002 SP2.
View 9 Replies
View Related
May 13, 2007
Examples:
This is the userform with the 'No Answer' boxes added into the user interface but not added to the code - this one doesn't crash excel: [url]
and this is the userform with the 'No Answer' boxes added into the code - this one will crash excel (but only when you open it directly from excel, it doesn't crash it if you test it out from vb): [url]
View 5 Replies
View Related
Jun 29, 2007
I have an accounting spreadsheet that is used by 25-30 people. This spreadsheet has a button the user can use to save this spreadsheet allowing the spreadsheet to save itself to a specific folder path base on the dates entered in the spreadsheet.
I have begun tracking certain items in the accounting spreadsheet and have added a section to the save macro that gathers data from the accounting spreadsheet and saves the data to a ‘Spreadsheet Stats’ spreadsheet. Since it was possible that more than one person might try saving the spreadsheet at the same time and try to open the ‘Spreadsheet Stats’ spreadsheet at the same time, I placed a loop in the macro that determines if the 'logging data' spreadsheet when opened is marked as "read-only". If the ‘Spreadsheet Stats’ spreadsheet is opened as "read-only", the macro closes the ‘Spreadsheet Stats’ spreadsheet then reopens the ‘Spreadsheet Stats’ spreadsheet again and again until opened without the "read-only" status. Code seen below.
Do Until Now() = start_time + 0.002082 Or Now() > start_time + 0.002082
Workbooks.Open Filename:= _
"G:EDCUSTSERV1_ACCTGIPL SpreadsheetsBilling SpreadsheetsData DropSpreadsheet Stats.xls"
Set WB = ActiveWorkbook
If WB.ReadOnly = False Then
Exit Do
End If
WB.Close
Loop
The macro works great, however, should a user try to save the spreadsheet and the loop happens to open and reopen the spreadsheet until the "read-only" status is gone, when the macro completes, a window pops up and alerts the user that the ‘Spreadsheet Stats’ spreadsheet is now available for editing.
My question: Is there any way to prevent that pop up window? I don’t want the user to think they need to edit the ‘Spreadsheet Stats’. Remember that the macro has completed when the popup window shows up, so Application.display alerts set to false
View 2 Replies
View Related