Posts by chirayuw

    Re: Macro - Paste pic to powerpoint


    Hi VBA_Wizard,


    I used Activesheet.Cells.Select because I have hidden columns and rows and they do not get selected when using this code. These vary from file to file but the procedure is the same - copy activesheet visible range and paste as picture. So the issue of the picture being small in a grey tile does not arise.


    The odd part is if I replace the code to create a New PPT instead of Opening one I already made - it is able to paste the picture in the slide.


    I did select the reference manually because for some reason the vba code is not enabling it automatically.


    Heres the code that creates a New PPT


    Re: Macro - Paste pic to powerpoint


    Hi VBA_Wizard,


    Same issue. It is still unable to paste the pic.


    I checked the sheet it was supposed to copy and it would seem that the change in the selection method is not selecting the activesheet area, and hence is pasting a blank copy.


    Before:

    Code
    'Copy range from main sheet as pic
    
    
    Range("A1").Select
    ActiveSheet.Cells.Select
    Selection.CopyPicture


    After:

    Code
    'Copy range from main sheet as pic
    
    
    Range("A1").CurrentRegion.Select
    Selection.Copy

    Hi all,


    I'm having trouble finishing part of my macro code. Basically what it does is it firstly take the activesheet range and converts it to a picture and then pastes this and resizes it on a new sheet called 'pptpic'. The it opens a powerpoint file I have already made and kept in the same folder called 'test.ppt'. Here is where my macro fails, as it is unable to paste the picture from excel into powerpoint on slide 2. The slide format is TitleOnly. So I would like a way to paste the pic into slide 2 of 'test.ppt'.


    Hi All. Basically I created a macro by searching online however it is not following the <> rule and instead copies from all sheets so I need help to fix it. Thanks in advance.


    Here's a Log File Template I created. When run, it creates a message box that tells you thank you for using the macro and it uses system information to show your userid and username. It furthermore pastes this data on the sheet, with the date and time of use. The password to view or edit the code is 1. The macro also protects the sheet after completion so that generated data cannot be deleted. Password for sheet is also 1.


    forum.ozgrid.com/index.php?attachment/47528/

    Re: Copying from Closed .csv file to open Active Sheet


    Here is the Macro. It does assume that the headings in your csv file begin in the first row and the data begins in the second. edit accordingly and if you need an example file then tell me. Also the -ThisWorbook.Path & - fuction essentially requires you to have the csv file in the same location as your calculation file. otherwise give it a specified path e.g. "C:\....."



    Re: VBA Copy Data According to Date and Site


    Nevermind I solved this issue a few days ago. I basically created a new sheet and placed the template of each table on the sheet and used an index match function to get the specifed date data from a given cell i.e. i would enter a date in one cell and based upon that the cells in the formula sheet would pull data for only that date and table as each range is specified. Simple yet elegant solution lol. then it was just a matter of using a copy paste macro from new sheet to original sheet. if anyone needs an example of what i did, then just post below and i'll amend my example file accordingly and reupload.

    Re: VBA Autofilter &amp; Subtotal or Sum to combine with Unkown column length


    Nevermind. I solved the issue myself by some hard thinking lol. Basically I recorded new vb macro that just copies the filtered data, opens a new sheet, value pastes the data, autofits the columns, and then runs my unkown column length macro to get the sum. Here is the finished code for people who are thinking of doing something similar.


    Ok so basically am a noob at VBA. But I have made some macro's by recording/ searching online but have now gotten stuck. I have two macro's. One sum's and unkown range and copies it to a sheet, whereas the other has autofilter option on it. I want to be able to essentially merge the two macro's so that it can use the autofilter as well as sum using my unkown range macro, because my data changes everyday. Please provide some insight into how I can achieve this. I tried by myself and failed. I tried using subtotal or r1c1 by looking at online formulas but clearly i am not as adept in vba lol. Below are the two macro's



    Autofilter


    Unkown Range sum and copy sum to diff sheet

    Ok basically I'm a complete newbie to macro coding. I only know how to record a macro, nothing else. What i want to do is 1 have 2 sheets in my file e.g. Sheet1 & Sheet2. In Sheet1 I have my raw data for all sites in row format. In sheet 2 I have individual daily adjustments I require as the raw data changes everyday.


    Essentially I would like to know a way to create a macro/ have a macro whereby I can match the Date & Site on both sheets. If they match then it should match the column names of Sheet 2 to Sheet1 and Value paste Sheet2 Data on those specific columns in Sheet 1. Also in my actual dataset Sheet1 sitenames are not identical to Sheet2 site names


    PFA a dummy sheet I created so u know the format of my data.