Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Importing .PRN files into Excel spreadsheet

Is there a way to import .PRN files into Excel Spreadsheet
automatically? I have tried recording macros and then tried to save it.
it did not work. I want to set up a button where you can just click it
and it will let you open .PRN files and then does everything
automatically.

Much appreciated!
-DR

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Importing .PRN files into Excel spreadsheet

I like to create a dedicated macro workbook that contains the code. And then I
put a big button from the Forms toolbar on the only worksheet in that workbook.
I'll add a few instructions to that sheet, too.

I'd tweak the code to get the name of the file to open from the user and then
include code that adds some more stuff--like formatting, filters, subtotals,
page setup (headers/footers/rows to repeat at top/etc).

Then it actually becomes a tool that makes life a lot easier.

My tweaked code could look a little like:

Option Explicit
Sub Testme01()

Dim myFileName As Variant

myFileName = Application.GetOpenFilename(filefilter:="Prn Files, *.PRN", _
Title:="Pick a File")

If myFileName = False Then
MsgBox "Ok, try later" 'user hit cancel
Exit Sub
End If

Workbooks.OpenText Filename:=myFileName '....rest of recorded code here!

End Sub

wrote:

Is there a way to import .PRN files into Excel Spreadsheet
automatically? I have tried recording macros and then tried to save it.
it did not work. I want to set up a button where you can just click it
and it will let you open .PRN files and then does everything
automatically.

Much appreciated!
-DR


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Importing .PRN files into Excel spreadsheet

Thank you so much for your help.... It works fine..

Once again Thanks.

Dave Peterson wrote:
I like to create a dedicated macro workbook that contains the code. And then I
put a big button from the Forms toolbar on the only worksheet in that workbook.
I'll add a few instructions to that sheet, too.

I'd tweak the code to get the name of the file to open from the user and then
include code that adds some more stuff--like formatting, filters, subtotals,
page setup (headers/footers/rows to repeat at top/etc).

Then it actually becomes a tool that makes life a lot easier.

My tweaked code could look a little like:

Option Explicit
Sub Testme01()

Dim myFileName As Variant

myFileName = Application.GetOpenFilename(filefilter:="Prn Files, *.PRN", _
Title:="Pick a File")

If myFileName = False Then
MsgBox "Ok, try later" 'user hit cancel
Exit Sub
End If

Workbooks.OpenText Filename:=myFileName '....rest of recorded code here!

End Sub

wrote:

Is there a way to import .PRN files into Excel Spreadsheet
automatically? I have tried recording macros and then tried to save it.
it did not work. I want to set up a button where you can just click it
and it will let you open .PRN files and then does everything
automatically.

Much appreciated!
-DR


--

Dave Peterson


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Importing .PRN files into Excel spreadsheet [email protected] Excel Programming 0 October 13th 06 06:22 PM
Importing a Value from many Excel Files STOVK Excel Discussion (Misc queries) 2 September 25th 06 02:23 AM
Importing Files into Excel [email protected] Excel Discussion (Misc queries) 2 June 27th 06 06:43 PM
Importing multiple files into spreadsheet ghs Excel Programming 0 May 3rd 06 09:29 PM
Importing CSV files in Excel Lamer Excel Programming 1 January 24th 05 04:52 PM


All times are GMT +1. The time now is 12:41 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"