OberonPlace.com Forums  

Go Back   OberonPlace.com Forums > Developer Forums > VBA > CorelDRAW/Corel DESIGNER VBA

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 05-11-2004, 14:05
graphicdesigner
Guest
 
Posts: n/a
Default files import

how do i get data from datbase or comma delimilted or tab delimilted files or excel

when i click on the import button i should be be to open the required file.
get the first record from the file to the corel document for eg

i can click next to goto next record and also cick on previous to go the previous record just in case if the user wants to chnage something
in the previuos record

now i have a button name cmd_import_click

and i have the following code
which opens an excel file how do i connect the above button to open all the files of different type and diffrent names .
something like a browse button will do thake me to the location and open the file for me.and do the above stuff when i click
next and previous button.i know printmerge allows u to do something like this but printmerge takes all the values(fields) in from the file
Sub ReadExcel()
Dim cnn As New ADODB.Connection
Dim rs As New ADODB.Recordset
Dim s As String

' Open the connection to an Excel file
cnn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=C:\data.xls;" & _
"Extended Properties=""Excel 8.0; HDR=No;"""

rs.Open "SELECT * FROM [Tabelle1$a1:a13]", cnn, _
adOpenForwardOnly, adLockReadOnly

s = ""

While Not rs.EOF
If s <> "" Then s = s & vbCrLf
s = s & rs!F1
rs.MoveNext
Wend

rs.Close
cnn.Close
Set rs = Nothing
Set cnn = Nothing


End Sub
Reply With Quote
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Thumbnailer Issue with EPS files vallentin Macros/Add-ons 2 16-03-2004 10:04
How to kill (do not show) Import Postscript filter, rrrrrr modzho CorelDRAW/Corel DESIGNER VBA 1 18-09-2003 10:56
Missing font dialog on import click101 CorelDRAW/Corel DESIGNER VBA 2 28-04-2003 12:32
Corel 10 file conversion script doesn't convert files Kevin CorelDRAW CS 0 13-04-2003 20:28
Importing Files... Craig Tucker CorelDRAW/Corel DESIGNER VBA 2 18-03-2003 19:40


All times are GMT -5. The time now is 17:58.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.
Copyright © 2011, Oberonplace.com