set axis min and max by macro problem

I have a macro to automate this process which is not working.  

I am sure it is very simple and anyone with some visual basic
knowledge should see the problem immediately.

Many thanks in advance.

The file is here:
www.menudujour.co.nz/MenuEngineering.xls

Gavin
0
gavin3711 (1)
10/9/2004 3:42:03 AM
excel.charting 18370 articles. 0 followers. Follow

2 Replies
681 Views

Similar Articles

[PageSpeed] 22

Gavin -

I include some suggestions and code on this page:

   http://peltiertech.com/Excel/Charts/AxisScaleLinkToSheet.html

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Peltier Technical Services
Tutorials and Custom Solutions
http://PeltierTech.com/
_______

Gavin wrote:

> I have a macro to automate this process which is not working.  
> 
> I am sure it is very simple and anyone with some visual basic
> knowledge should see the problem immediately.
> 
> Many thanks in advance.
> 
> The file is here:
> www.menudujour.co.nz/MenuEngineering.xls
> 
> Gavin

0
10/9/2004 4:01:11 AM
Here is one that is automatic. The operative lines are
 .MinimumScale = bottom
 .MaximumScale = Top

Private Sub Chart_Activate()
Application.ScreenUpdating = False

With Sheets("Acct Risk")
xas = Application.Min(.[arcols]) - 500
If xas < 0 Then
mc = -500
Else: mc = 500
End If

bottom = Application.Floor(xas, mc)
x = Application.Max(.[arcols])
If x < 0 Then
mct = -500
Else
mct = 500
End If

Top = Application.Ceiling(x, mct)
End With

 ActiveChart.Axes(xlValue).Select
    With ActiveChart.Axes(xlValue)
        .MinimumScale = bottom
        .MaximumScale = Top
        .MinorUnitIsAuto = True
        .MajorUnitIsAuto = True
       ' .MajorUnit = 500
        .Crosses = xlAutomatic
        .ReversePlotOrder = False
        .ScaleType = xlLinear
        .DisplayUnit = xlNone
    End With
 ActiveChart.Deselect
 Application.ScreenUpdating = True
End Sub

-- 
Don Guillett
SalesAid Software
donaldb@281.com
"Gavin" <gavin@menudujour.co.nz> wrote in message
news:ed407d1.0410081942.33cfc34e@posting.google.com...
> I have a macro to automate this process which is not working.
>
> I am sure it is very simple and anyone with some visual basic
> knowledge should see the problem immediately.
>
> Many thanks in advance.
>
> The file is here:
> www.menudujour.co.nz/MenuEngineering.xls
>
> Gavin


0
Don
10/9/2004 1:35:09 PM
Reply:

Similar Artilces:

How do i configure AVS settings.
In 2.0 credit cards have the use of using AVS but how do i configure what to reject. say if the billing info is wrong or if the zip code is wrong? ...

setting up multiple email accounts #2
I followed the rules for setting up the pop3 and smtp accounts for multiple mail accounts, but when I access outlook express the additiona account does not recognize the password I've asked it to remember. HELP! KCB <anonymous@discussions.microsoft.com> wrote: > I followed the rules for setting up the pop3 and smtp > accounts for multiple mail accounts, but when I access > outlook express the additiona account does not recognize > the password I've asked it to remember. HELP! Ask in an Outlook Express newsgroup. -- Brian Tillman ...

Outlook Web Access attachment problem
We have a program that will generate a .snp file and then email it to whatever recipient it needs to go to. If they receive the email in Outlook it will allow them to open the file properly with the Snapshot viewer. However, if they go to the same email in OWA and try to save the attachment, it attempts to save it as an .mdb file. Why would OWA ignore the original extension and try to give it a different one? "Joe Giddings" <j_nospam_giddings@thehammocksource.com> wrote in news:jI9gd.11726$ta5.6952@newsread3.news.atl.earthlink.net: > We have a program that will genera...

Macros at POS
How far can you take the macro feature? If for example i want to discount an item by a set amount or by a percentage for customers who have a voucher, could i set up a macro which would find and discount an item in a transaction? or is this asking too much? Yes, that's too much for a macro. You can do it with a COM add-in ,or have it done or look into an existing discount or promotion add-in. Macros can only emulate keystrokes or mouse clicks - there is no way to include IF..THEN logic. Glenn Adams Tiber Creek Consulting http://www.tibercreek.com glenn@tibercreek.com ---------...

mail sending problem
Hi , I am very new in the exchange server just now I have deployed Microsoft Exchange Server 2003 at my organization now i have some problem in that . I am able to send mail outside the domain except yahoo .whenever I am sending mail from my exchange mail id to any yahoo mail id it is showing me mail has been sent but on yahoo id it is not delivering even I am not getting the DFR, second I wants to know that can we take the backup of single mail box (boxs) and please tell me step by step how can we take backup (at least the location ) Thanks in Advance Madi The most probable reason is t...

AFX_MANAGE_STATE() macro disturbs the startup position of the ATL dialog
Hi All, I have a MFC dialog based application and a COM component developed using ATL with MFC support. The COM component exposes an interface ISum that has a method called Add(). The Add() method displays an ATL dialog that accepts numbers from the user on which addition is to be performed and displays the result as well. The contents of the Add() method are as given below: STDMETHODIMP CSum::Add() { CAcceptInput dlg; dlg.DoModal(); return S_OK; } On click of one of its buttons, the MFC dialog application, instantiates the COM component and invokes the ISu...

Windows Welcome Screen Login Looping Problem
Up until now no startup problems whatsoever with my system. Today, I press the start button and it boots fine to the Windows' Welcome Screen. When I click on my account icon (no password ever entered) it tries to login (I see my desktop for about 4-5 seconds) but it comes back to the same Windows' Welcome Screen after about 5-10 seconds. My significant other also has an account icon and when she tries to login from the welcome screen she can't get pass the screen either and gets the same 5-10 seconds looping problem that happens to me. System specs: Dell Deminsio...

Incoming mail server problem
I use supanet for the internet and recently had to clear off a load of viruses and worms from my computer. Computer is clean now. I've run up to date spybot. adaware and cleaned all viruses with Mcaffee internet security as well as running stinger. Sasser, and W32 pate.b were included. Have also completed all windows updates. Everything is working fine now except my email. When I restart the computer my incoming mail server keeps changing from pop.supanet.com to a strange number. 9eg 17.02.01.10 or something similar) It also changes the user name from 3612 to 3612@supanet.com (It adds su...

run Microsoft Publisher 2002 macro in command line
This might look simple but I cannot figure it out. How can you run a Microsoft Publisher 2002 macro in command line? (like in Word, you can do winword file.doc /mNAMEOFTHEMACRO ) In a command line I am not sure. Try posting at microsoft.public.publisher.programming Brian Kvalheim Microsoft Publisher MVP http://www.kvalheim.org >-----Original Message----- >This might look simple but I cannot figure it out. > >How can you run a Microsoft Publisher 2002 macro in command line? >(like in Word, you can do winword file.doc /mNAMEOFTHEMACRO ) >. > ...

Problems performing a restore to a SAN drive
We recently move our message stores to SAN. I've tried to perform a restore to a recovery storage group on the SAN and am not able to do it. We use Ultrabac as our backup application, but I've tried NTBackup also and am getting the following errors in the App logs: Information Store (3576) Callback function call ErrESECBRestoreGetDestination ended with error 0xC7FE1F42 Database not found. and Failed to find a database to restore to from the Microsoft Active Directory. Storage Group specified on the backup media is e0d4e0af-f91a-490d-9b40-47e27b9fb714. Database speci...

Outlook Security Settings #2
I am trying to use Outlook security settings. I have installed the settings precisely as described on the MS site and the settings work perfectly for me and one or two others but not for the rest of my defined group. We are using Exchange 2003, Outlook 2003 and Outlook XP. I cannot find any debugging or logging info anywhere and am a little stuck as to what to do next. Can anyone offer any ideas??? jON ...

XMLA .NET connection problem
Hi, After install msxml 4.0 and XMLASDK 1.1, i proceed to configure the datasource.xml file, as follow: <DataSource> <DataSourceName>FoodMart 2000</DataSourceName> <DataSourceDescription>Microsoft Analysis Server 2000 on local machine</DataSourceDescription> <URL>http://localhost/xmla/msxisapi.dll</URL> <DataSourceInfo>Provider=MSOLAP.2;Data Source=md001144</DataSourceInfo> <ProviderName>Microsoft XML for Analysis</ProviderName> <ProviderType> <TDP/> <MDP/> <DMP/> </ProviderType>...

Problems with DATE data type
Hi!!! I've got a little problem with the next macro in Excel. The problem is that I must look for some information in a data bas using as filter a specific day an hour in the year. I get the date and the hour using a form and then the macro calle "Busqueda" receives the value. I've programmed the macro using MSQuery just to see the necessary cod and the problem has appeared when I've tried to include the para called "Dia" in the SQL code. I've tried using " & Dia & " but it doesn't work and I don't know ho to include my param...

Publisher 2003
I'm attempting to print a calendar and I keep getting the message, "Cannot load the printer driver." I have no idea what that means other than I'm unable to print my calendar. Anyone have any ideas? I get the same message whenever I try to print a card I've created. HELP! -- The computer has been chucked out the picture window and the birds are nesting in it. *sigh* Merrie wrote: > I'm attempting to print a calendar and I keep getting the message, > "Cannot load the printer driver." I have no idea what that means > other than I'm una...

I am writing a screenplay and am wondering about setting margins easier.
Version: 2008 Operating System: Mac OS X 10.5 (Leopard) Processor: Intel The way things are now, every time I switch from the narrative to dialogue I have to reset the margins or tabs. I am guessing there is some way to do it in one click but I am pretty weak when it comes to knowing computers. <br><br>Is there a way and if so, please explain it to me in the simplest of terms. <br><br>Thanks! In Word, we typically set the margins once only, for the entire document. We then use Styles to contain the settings for indents and tabs. A style is simply a named...

Paging Size set up for sql 2005 best performance
erver windows 2003 sp1. 64 bits, Paging file size for selected drive C is (custom selected) Initial 2046 MB, and maximum 4092 MB. It is currently allocated 4081 MB. Computer RAM memory is 8GB. Server functions as a database MS SQL 2005 server, and it is used under heavy insert database operations The problem is that it can be seen on windows task manager there is on PF usage and Page File Usage hHstory around 8.2 GB paging file size not 4081 GB as it is given on virtual memory page set up. DoleBludger (DoleBludger@discussions.microsoft.com) writes: > erver windows 200...

Reinstall problem
I have a CRM 1.2 MSDN installation. I ran add/remove programs to un-install. Everything seemed to uninstall just fine. I then ran the installer again to reinstall. I wanted to use the existing database. I select the: "Connect to an existing database" options, click next then select my SQL server from the list. I then get a message: Setup could not find any valid Microsoft CRM databases on the server you have specified. You must select a different server. I know the databases are there. I can see them in enterprise manager. The system was working fine except for ...

Problem w/ Task Manager
This is a multi-part message in MIME format. ------=_NextPart_000_0006_01CB4835.4C042E00 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable I am running a laptop with WIndows XP SP3. I am not sure what changed or = happened but my task manager now only shows the processes tab. The tabs = are mising for me to change views as well as the title bar for my task = manager windo and the menu bar i also gone. How can I correct it? Thanks ------=_NextPart_000_0006_01CB4835.4C042E00 Content-Type: text/html; charset="iso-8...

Mac problems opening excel files when connected to two windows shares
Version: 2008 Operating System: Mac OS X 10.5 (Leopard) Processor: Intel I'm noticing a strange problem when I try to open excel files when I connect to a second windows server share. I'm getting a cannot open excel file error. Not sitting at my work mac computer at the moment so not quite sure that was the exact error. <br><br>This error is occuring on both leopard and snow leopard with Office 2008 for mac. <br><br>The two windows servers are being connected to by smb://server1/common and smb://server2/common. <br><br>If i connect to each one i...

An error number : 424 problem
I'm having trouble with an attachment field. On a report I can see the picture and the filename of the selected attachent properly. Now in a SQL UPDATE string that i'm making I always get the error 424 Object required. Here is the line where it happens : 'mySQL = mySQL + ", scan_g = " & prn_du_pied_g.FileName scan_g is a Text field prn_du_pied_g is an attachment All I want to do is to use the filename of the attchment. How do I solve this Thank you for the help -- Eric "ericb" <eric@b.com> wrote in message news:9A...

Macro help #6
I can't figure out how to set up VLOOKUP formula with 2 variabl elements. After the intial formula runs in the specified cell, I want 2 element changed: the location of the result and the lookup value. In the case below that would be B1 and A2. Range("B1") = Application.WorksheetFunction.VLookup(Range("A2" Range("data"), 2, False) I've tried setting it up like this: Dim i, k As Integer For i = 1 To 2 For k = 1 To 2 Range("B" & k) = Application.WorksheetFunction.VLookup(Range("a" i), Range("data"), 2, False) Next Next ...

Mail and Catalog merge problems
This is a two part question. The first part concerns an error and the second part is seeking advice. First the error: I am trying to create a data source for use in a catalog merge. No matter what method I use, even using "Create Address List" from Publisher's Tools menu, I get an error dialog saying: "The operation cannot be completed because of dialog or database engine failures. Please try again later." What causes this and how do I correct it? I would like to be able to connect to a SQL 2005 database for merge data. Now the request for advice: I am cr...

Publisher 2007 printing problem
I have a publisher file 6x4 template. When I try to print on a 4x6 photo paper instead of 1 page landscape it prints 2 in portrait. No mater what I do seems to change this. First, File Print setup Size: 4x6 Portrait OK Then, File Page Setup Special Size Width: 6" Height: 4" Landscape OK Build your project Save File Print -- Don - Publisher 2000� Vancouver, USA "tomincolorado" <tomincolorado@discussions.microsoft.com> wrote in message news:7CC2310B-E932-459A-94A2-45E96D530FC7@microsoft.com... >I have a publisher file 6x4 ...

2 data ranges shown on 1 line with 2 axis
Is it possible to have 2 data ranges plotted on one line against 2 value axis?? The X axis will be a dateline. I need to be able to look at a point on the line e.g., 3/07/05 and see a value on the Z axis and a different value on the Y Axis... but on 1 line not 2. I didnt think it was possible, but I have an engineer who believes this is possible. Help please ! cheers, Nadia Excel does not do 3D charts well. Maybe someone else can point you to ways to kluge this. "Nadia" <Nadia@discussions.microsoft.com> wrote in message news:C4186078-FEDE-45D4-9849-C7B25804D945@micro...

problem with Corrupt pst file
I have a problem with a corrupt? pst file. cannot download mail, cannot delete mail in the folders Tried to run the scanpst.exe, gave an error first, did do some repair, still the same problem, tried again, said the file is fine. Did repair office (2003) no difference, restoring a backup pst, works fine (only the backup is one month old) I imported the corrupted pst file as a second "personal folders" for viewing but cannot move the e-mails from the corrupt to the backup = now main pst file Are there any other tools/utilities to check/restore the pst file? Thanks for your help...