Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Userform idea

Hello,

yes you people will know my project inside and out soon!
i am looking for a way of creating a form that will allow
me to search through my files and when it finds the file i
am looking for it will open all the details in another
form.

i would also like to be able to edit this data if needed.

all the data for the people are on the same row,
each row is individual to the person.

any help, please let me know!

Thank you,

Robert Couchman
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Userform idea

Robert,

Here is a simple function to check file/directory existence that you should
be able to use

Public Function IfExists(FileName As String, Optional Directory As Boolean =
False) As Boolean
Dim sFile As String
If Directory Then
sFile = Dir(FileName, vbDirectory)
Else
sFile = Dir(FileName)
End If
IfExists = sFile < ""
End Function

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Robert Couchman" wrote in
message ...
Hello,

yes you people will know my project inside and out soon!
i am looking for a way of creating a form that will allow
me to search through my files and when it finds the file i
am looking for it will open all the details in another
form.

i would also like to be able to edit this data if needed.

all the data for the people are on the same row,
each row is individual to the person.

any help, please let me know!

Thank you,

Robert Couchman



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Userform idea

Thank you for that point, but really i am looking for a
piece of script that will search through the 'records' in
my spreadsheet.

once it has found the row with the data on, it will then
display all the information related (along the row in
different columns) will be displayed in text boxes.

Hopefuly this is not impossible.

if anyone needs a more in depth explanation please just
say.

Thank you,

Robert Couchman
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Userform idea

That's funny, I've re-read the post and it definitely says '... that will
allow me to search through my files and when it finds the file i am looking
for ...'.

To look for data in a spreadsheet, let's assume the key is column A and you
want to find item "ABC".

Set oFind = Columns("A:A").Find("ABC")
If Find Is Nothing Then
MsgBox "Not found"
Else
Load Userform1
With Userform1
.Textbox1.Text = Ofind.Offset(0,1).Value ' the value in column B
for found item
.Textbox2.Text = Ofind.Offset(0,2).Value
'etc.
.Show
End With
End If

This is just rattled off, untested, but I hop it works and is what you want.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Robert Couchman" wrote in
message ...
Thank you for that point, but really i am looking for a
piece of script that will search through the 'records' in
my spreadsheet.

once it has found the row with the data on, it will then
display all the information related (along the row in
different columns) will be displayed in text boxes.

Hopefuly this is not impossible.

if anyone needs a more in depth explanation please just
say.

Thank you,

Robert Couchman



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Userform idea

Cheers,

that is great Bob,

i know the code may not work, but at least i now have
grounds to start the next major part of my program.

Thank you,

Robert Couchman
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
Help!! No idea where to go next... TJaques Excel Discussion (Misc queries) 4 February 28th 07 08:22 PM
I've no idea how to do this. :( MagnoliaSouth Excel Worksheet Functions 3 June 28th 06 09:07 PM
any idea? CC Links and Linking in Excel 1 May 12th 05 12:37 AM
any idea?? NF Excel Worksheet Functions 1 April 24th 05 02:51 AM
Help Please. No Idea what to look for or how to do this David Chadwick ([email protected]) Excel Discussion (Misc queries) 0 February 28th 05 04:19 PM


All times are GMT +1. The time now is 08:25 PM.

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"