strname
The UK's Number 1 for Microsoft Office Training Add this page to your favourites/bookmarksBookmark page
 
View printable version of pagePrintable version
Plus One Google
Customer: Sign in
Delegate: Sign in
Trainer: Log in

Forum home » Delegate support and help forum » Microsoft VBA Training and help » StrName

StrName

resolvedResolved · Low Priority · Version 2007

replyReply Thu 19 May 2011, 13:47Delegate Theresa said...

Theresa has attended:
Excel VBA Intro Intermediate course

StrName

Hi,

in my selection data my strName currently = theresa.carey@ticketmaster.co.uk (i also have a number of other names in my selection data but don't want to have to input the whole name only first and last name. for example Theresa Carey.

How can i build it into my code to exclude the . @ticketmaster.co.uk?

Let me know if this makes any sense and if not i am happy to send a file across.

Regards
Theresa

For upcoming training course dates see: Pricing & availability

replyReply Fri 20 May 2011, 13:49Trainer Anthony said...

RE: strName

Hi Theresa, thanks for your query. Try this out:


***

strname = "theresa.carey@ticketmaster.co.uk"

MsgBox Left(strname, Len(strname) - 19)

***

Hope this helps,

Anthony

Fri 27 May 2011: Automatically marked as resolved.

 

Please browse our web site to find out more about
access visual basic courses and other Microsoft training courses.

Vba tip:

Use GoTo to Select A Cell With VBA

To select a certain cell on a Worksheet you can use:

Application.Goto Reference:=Range("V300")

or more simply

Range("V300").Select

If, on the other hand, you want the selected cell to be the top/left cell on the screen you use:

Application.Goto Reference:=Range("V300"), Scroll=True

View all VBA hints and tips


Microsoft Certified Partner Accredited Training Provider: Institute of IT Training Institute of Leadership and Management - Certified Courses Security Seal verified by visa, mastercard securecard