Solved

take out spaces in path

Posted on 1999-01-29
2
311 Views
Last Modified: 2010-05-03
i have this code in my program
Private Sub Form_Load()
picpath = "\\computer2\photo\"
Picture1.Picture = LoadPicture(picpath & Clipboard.GetText & ".jpg")

End Sub
Here is the problem clipbard.gettext may contain blank spaces and when i try to open the picture it doesent find it
it tries to open 1       .jpg instead of 1.jpg
I have to capture 7 caracters in the clipboard cause sometime i could have 1234567.jpg
is there a way to take out these blank spaces
0
Comment
Question by:jerbell
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 1

Accepted Solution

by:
MAD012999 earned 100 total points
ID: 1471201
Try this:

Picture1.Picture = LoadPicture(picpath & replace(Clipboard.GetText," ", "") & ".jpg")

Good Luck,
Mike
0
 

Author Comment

by:jerbell
ID: 1471202
well i found the answer with using a loop and inst
but your is short and sweet didn't try it but will give you points since my code works
but if yours works all the better.
thanks
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses
Course of the Month6 days, 21 hours left to enroll

622 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question