Posts by Giorgio

    I have a pivot table that i am trying to copy out to another sheet.


    A note of clarification.
    My variables are used in the sum field - I have 70 different columns of data, that I want to use in combination one column field and one row field. So each time I'm changing the sum calculated by add a new sum and remove the previous one.


    I've tried to record the procedure to highlight a new variable and remove the previous. However it doesn't seem to work. Any suggestions gratefully received.



    I enclose my code below.


    Re: Conditional Formatting of Cells


    sorry for any confusion caused and sorry for continuing to be a pain but I can't seem to get it to work.


    IF cell a1 is greater than -7 I want it to be red
    If cell a1 is greater than 14 I want it to be green.
    CF does this.....


    I want Cell a2 to red, or green according to cell A1.


    I hope this clarifies my predicament.

    Sorry to be a pain,


    I am using conditional formatting to set the colour of a cell. I now want to change the colour of the adjoing cell to the same as the conditional format cell. CF doesn't have this as an option, any help on alternatives would be gratefully received.

    Re: Saving a chart as a wmf


    [code]
    Set chtActive = ActiveSheet.ChartObjects(1).Chart
    chtActive.Export "c:/test/" & strSheetName & ".wmf", "wmf"
    [\code]


    I've declared the chart as chtActive and I'm trying to call the wmf a name that I've saved as strSheetName but i get an error


    Run time error 1004.


    Method 'Export' of object'_chart' failed


    any ideas why?


    thanks for your comments so far.

    I was wondering as I am creating 100 excel sheets, (in 4 woorkbooks) with data and a chart (using a macro) is there anyway of saving the charts as a wmf file so I can use them in quarkexpress?


    I am aware that one can save them to a cliboard but not sure if this helps in creating a wmf file.


    any help would be gratefully appreciated.

    Re: vba chart creation on a new worksheet


    Thanks I feel as if a bus has run me over, can't imagine what was going on in my head to screw this macro up so badly in such a little amount of time. I will be eternally grateful for your help....


    p.s. did I say it works. many thanks

    I'm having problems with a spreadsheet trying to create a new spreadsheet and then creating a new chart. I seems to have corrupted the code but I can't figure out what has happened. (i performed the ultimate crime and saved over my original code) doh!!!!!!!!


    Any help would be gratefully appreciated.


    I have a spreadsheet and am copying the spreadsheet and updating the 7 charts on the sheet with data on this new sheet. No problems here and has been working for some six months. came back today after my christmas break and the charts are now causing errors. Code is below.


    My question is where does excel assign the chart name, as I think it has corrupted as the data is being assigned to the wrong chart. any help would be gratefully appreciated.


    The error i get is: Method 'Seriescollection' of object '_chart' failed

    Re: automate data on a new page


    I don't think vlookup will help on this occasion, but if you could provide me with more details I'll give it a bash.


    Sorry to be taking up your precious time.

    I have a sheet with data, c0116 london, on a second sheet, sheet1, I copy some data and create some charts. By using a drop down combo box I want to change cell c1 to another country and change all the data and tables. The highlighted cells on sheet1 all come from the other sheet.


    I'm not sure if excel can do this. It sounds to me like something that should be possible but not sure how to approach this. Hope my posting makes sense.


    Any help would be gratefully appreciated.

    Sounded like an easy thing that has got me stumped. I've created a macro, assigned to a custom button and I would like to change the labrel on that button to something more appropriate than "custom button".


    Any help would be gratefully appreciated.

    I suspect it is because I am using activesheet in my macro. I'll enclose a short bit as it is rather long.


    sorry for being so stupid, thanks for being so patient with my problem.


    here is my macro within yours.


    Sub layout1()
    '
    ' Keyboard Shortcut: Ctrl+q
    '
    Dim ws As Worksheet
    For Each ws In Worksheets
    Application.Run "PERSONAL.XLS!layout"
    MsgBox ws.Name
    Next
    End Sub


    Sub layout()
    '
    ' Keyboard Shortcut: Ctrl+r
    '
    Range("A6").Select
    Selection.Copy
    Range("F1").Select
    ActiveSheet.Paste
    Range("B30:D45").Select
    Application.CutCopyMode = False
    Selection.Copy
    Range("F2").Select
    ActiveSheet.Paste
    Range("A6,C6:D6").Select
    Range("C6").Activate
    Application.CutCopyMode = False
    Selection.Copy


    end sub

    This code seems to run my macro, the messagebox says the name of various spreadsheets but the macro continues to work on the same sheet. should I have a line that says move from from one sheet to the next. also the message box ask for a reply when calling each sheet. rather than the macro continuing.


    thanks for you help.


    Quote

    Originally posted by WillR
    didn't know whether this was solved or no so...


    Code
    Sub sheetstuff()
    Dim ws As Worksheet
    For Each ws In Worksheets
        'your code here i.e.
        MsgBox ws.Name
    Next
    End Sub


    Hope it helps

    It seems as if my macro skips the filling in of the sheet with data and goes to the next application run function which is a text to column function.


    it works properly if i dim this statement however!!!ahhhhhhhhhhhhh!


    I can't put a create new sheet statement as I want the macro to run on the select workbook and not the one which contains the macros. More than one person has access to the macros sheet.