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 01-02-2009, 02:36
inaph
Guest
 
Posts: n/a
Default Variable form controls based on file system

I am trying to dissect the code from another post to understand it better. It is a little more functionality than I think is needed for my purpose but it has elements that I want to implement.

Code Here

I changed
Code:
Private Sub UserForm_Activate()
   Const baseFolder$ = "d:\"
to
Code:
Private Sub UserForm_Activate()
   Const baseFolder$ = "C:\Laser\Parts\"
and moved
Code:
'top of form
private bExitRequest%
I get Runtime error 5 "invalid procedure call" in UserForm_Activate() on
Code:
file = Dir()
If I use this I get file not found error and the file variable in locals window is holding "Autoexec.bat"???
Code:
file = Dir("")
...tried alot different path strings in "dir()" but I'm still having trouble with it.

... and for more fun I'm developing using CD12 and Vista but it will likely run on x3 and xp.

What I'd like is to have my form start by reading the default directory (assigned in code) and return the folers as radio buttons. Resising of the form and repositioning of the radio buttons should happen programmatically in response to adding new folders in that directory. Upon selecting an option the function basicly does the same thing and presents a new set of radio controls. Only, when an option is selected this time, it returns a total of 5 variables. The selected subfolder name, the cdr file name, two images and a text file that are stored within that subfolder.

In this case it is

'default directory
C:\Laser\Parts\

'subdirectories
Partname 1
Partname 2
Partname 3

'files in subdirectories (returned as variables for further use)
Partname.cdr
Thumbnail.bmp
Fixture.bmp
Notes.txt

Please and Thank You
inaph
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
How to access run-time created form controls ddonnahoe CorelDRAW/Corel DESIGNER VBA 3 14-02-2008 14:44
Object variable or with block variable not set.. m31uk3 Code Critique 2 26-12-2007 13:17
Adding controls to forms at runtime ddonnahoe CorelDRAW/Corel DESIGNER VBA 15 20-12-2005 13:59
object variable not found graphicdesigner CorelDRAW/Corel DESIGNER VBA 4 22-11-2004 18:13
Open file form ebarchiesi CorelDRAW/Corel DESIGNER VBA 1 13-09-2003 07:50


All times are GMT -5. The time now is 14:19.


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