Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 01-02-2023, 05:55 PM
psyclone psyclone is offline EXCEL 2007 - Create PDF Windows 10 EXCEL 2007 - Create PDF Office 2007
Novice
EXCEL 2007 - Create PDF
 
Join Date: Jan 2023
Posts: 3
psyclone is on a distinguished road
Default EXCEL 2007 - Create PDF

Hello,


I have Excel 2007, get an error when running the following code to create PFD. I can save the exact code and run it on Office360 no problem.
I'm interested to know if it's my '07' version or does my machine require an Add-in to run it?

Also, apologies regarding my post description, I posted accidentally before completing.

'-------------------------------------------------
Sub CreatePDF()

Worksheets("SCHEDULES").Activate

Dim dte As String
Dim Adr As String
Dim IDw As String
Dim path As String
Dim fname As String
dte = Range("H3").Text
Adr = Range("G2").Text


IDw = Format(dte, "medium Date")


path = "C:\Users\.....\....."
fname = Adr & ", " & IDw & ".pdf"
ActiveSheet.ExportAsFixedFormat _
Type:=xlTypePDF, _
Filename:=path & fname, _
IgnorePrintAreas:=False ' ,_
' OpenAfterPublish:=False


End Sub

'-----------------------------------------------

Last edited by psyclone; 01-02-2023 at 06:04 PM. Reason: Posted accidentally before completion
Reply With Quote
 

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to create microsoft Excel 2007 and 2010 File in .xlsx format ipacesetters Excel 1 12-16-2019 05:13 PM
How to create Sparklines in older versions of excel. (Excel 2007 and older) Nicewithit Excel 0 04-18-2018 08:21 PM
EXCEL 2007 - Create PDF Mail merge from excel - need to create sheets and create a table bluenosebex Mail Merge 5 08-02-2015 05:34 PM
Create SVG with PPT 2007? qa1952 PowerPoint 0 07-14-2015 12:24 PM
How to create a resizeable simple checkbox Excel 2007 Imageman100 Excel 1 01-10-2014 11:53 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 01:42 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft