+ Reply to Thread
Results 1 to 6 of 6

Macro to convert a specific

  1. #1
    Registered User
    Join Date
    01-29-2014
    Location
    Geneva, switzerland
    MS-Off Ver
    Excel 2007
    Posts
    8

    Macro to convert a specific

    Hello everyone,

    I am looking at converting a specific sheet from multiple files in a pdf format. I have found a macro wich I have slightly modified to be able to select the input folder containing the original files and the output folder where the pdf files should go. Currently it is working fine but the whole worksheet in being printed to a pdf file. I would need to only print the spreadsheet named "Profil". The code is described here below.

    Is there any one who could help me in modifying the existing macro to only convert the spreadsheet "Profil" to pdf?

    In advance thank you very much

    Please Login or Register  to view this content.

  2. #2
    Valued Forum Contributor
    Join Date
    09-21-2011
    Location
    Birmingham UK
    MS-Off Ver
    Excel 2003/7/10
    Posts
    2,188

    Re: Macro to convert a specific

    if BukName ="Profil" then

    ....export code

    end if
    Hope this helps

    Sometimes its best to start at the beginning and learn VBA & Excel.

    Please dont ask me to do your work for you, I learnt from Reading books, Recording, F1 and Google and like having all of this knowledge in my head for the next time i wish to do it, or wish to tweak it.
    Available for remote consultancy work PM me

  3. #3
    Registered User
    Join Date
    01-29-2014
    Location
    Geneva, switzerland
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: Macro to convert a specific

    Hi Nathansav

    Sorry I am relatively new to VBA, could you show me on the macro where I should insert the code you specified?

    Thank you

  4. #4
    Valued Forum Contributor
    Join Date
    09-21-2011
    Location
    Birmingham UK
    MS-Off Ver
    Excel 2003/7/10
    Posts
    2,188

    Re: Macro to convert a specific

    before your export code after setting BukName = Left(Buk.Name, LPosition)

  5. #5
    Registered User
    Join Date
    01-29-2014
    Location
    Geneva, switzerland
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: Macro to convert a specific

    Hi Nathansav

    Sorry I have just tried but it does not seem to export the pdf files. Is it possible to define a range withing the "profil" sheet? I guess that your code identifies the file name and not the sheet within the worksheet. Or more probably I am totally out.

  6. #6
    Valued Forum Contributor
    Join Date
    09-21-2011
    Location
    Birmingham UK
    MS-Off Ver
    Excel 2003/7/10
    Posts
    2,188

    Re: Macro to convert a specific

    You said spreadsheet in your post, so thought that you meant a workbook called Profil. Which is what my code does.
    Please Login or Register  to view this content.
    you will need to change these both to Sheets("Profil").index i think.
    Last edited by nathansav; 08-04-2014 at 10:48 AM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Macro to copy specific data from one WB to specific cells in another WB based on specific
    By d_rose in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-26-2014, 11:05 AM
  2. Convert specific number into specific sentence
    By sarangapani in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-26-2013, 03:57 PM
  3. [SOLVED] Use Macro to convert specific row to CSV
    By homer09001 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-13-2013, 03:53 PM
  4. [SOLVED] Macro to convert specific text and format specific text within a string
    By Mencae in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 12-06-2012, 12:13 AM
  5. Convert numbers using specific key with VBA
    By missy22 in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 08-23-2012, 01:12 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1