PC Review


Reply
Thread Tools Rate Thread

03 to 07 function update

 
 
Martin Wheer
Guest
Posts: n/a
 
      9th Jun 2009
Below is the code I am using in 2003 vba. It does not work in 2007.

Dim wks As Worksheet
If Left(wks.Name, 1) = "R" Then - 07 does not like Left

end if

I tried finding the correct function on 2007 but got no where with it. Any
help would be greatly appreciated.
Ta,
Martin


 
Reply With Quote
 
 
 
 
r
Guest
Posts: n/a
 
      9th Jun 2009
try ...
If VBA.Strings.Left(wks.Name, 1) = "R" Then
regards
r


Il mio ultimo lavoro ...
http://excelvba.altervista.org/blog/...ternative.html


"Martin Wheer" wrote:

> Below is the code I am using in 2003 vba. It does not work in 2007.
>
> Dim wks As Worksheet
> If Left(wks.Name, 1) = "R" Then - 07 does not like Left
>
> end if
>
> I tried finding the correct function on 2007 but got no where with it. Any
> help would be greatly appreciated.
> Ta,
> Martin
>
>
>

 
Reply With Quote
 
Patrick Molloy
Guest
Posts: n/a
 
      9th Jun 2009
as given, the wks object hasn't been set to a worksheet

if you add for example
Set wks = ActiveSheet
it works fine:

Dim wks As Worksheet
Set wks = ActiveSheet
If Left(wks.Name, 1) = "R" Then
'do something
End If


"Martin Wheer" <(E-Mail Removed)> wrote in message
news:h0l3hj$nlm$(E-Mail Removed)...
> Below is the code I am using in 2003 vba. It does not work in 2007.
>
> Dim wks As Worksheet
> If Left(wks.Name, 1) = "R" Then - 07 does not like Left
>
> end if
>
> I tried finding the correct function on 2007 but got no where with it.
> Any help would be greatly appreciated.
> Ta,
> Martin
>

 
Reply With Quote
 
Martin Wheer
Guest
Posts: n/a
 
      9th Jun 2009
Hi,
Thanks for the help.
Ta,
Martin

"Patrick Molloy" <(E-Mail Removed)> wrote in message
news:E73EC0B2-2DF5-46AB-BF38-(E-Mail Removed)...
> as given, the wks object hasn't been set to a worksheet
>
> if you add for example
> Set wks = ActiveSheet
> it works fine:
>
> Dim wks As Worksheet
> Set wks = ActiveSheet
> If Left(wks.Name, 1) = "R" Then
> 'do something
> End If
>
>
> "Martin Wheer" <(E-Mail Removed)> wrote in message
> news:h0l3hj$nlm$(E-Mail Removed)...
>> Below is the code I am using in 2003 vba. It does not work in 2007.
>>
>> Dim wks As Worksheet
>> If Left(wks.Name, 1) = "R" Then - 07 does not like Left
>>
>> end if
>>
>> I tried finding the correct function on 2007 but got no where with it.
>> Any help would be greatly appreciated.
>> Ta,
>> Martin
>>



 
Reply With Quote
 
Martin Wheer
Guest
Posts: n/a
 
      9th Jun 2009
Hi,
Thanks for the help.
Ta,
Martin


"r" <(E-Mail Removed)> wrote in message
news4E748C4-BE5C-4824-9102-(E-Mail Removed)...
> try ...
> If VBA.Strings.Left(wks.Name, 1) = "R" Then
> regards
> r
>
>
> Il mio ultimo lavoro ...
> http://excelvba.altervista.org/blog/...ternative.html
>
>
> "Martin Wheer" wrote:
>
>> Below is the code I am using in 2003 vba. It does not work in 2007.
>>
>> Dim wks As Worksheet
>> If Left(wks.Name, 1) = "R" Then - 07 does not like Left
>>
>> end if
>>
>> I tried finding the correct function on 2007 but got no where with it.
>> Any
>> help would be greatly appreciated.
>> Ta,
>> Martin
>>
>>
>>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
now function not to update baha Microsoft Excel Misc 5 25th Sep 2009 11:57 AM
Re: now function not to update baha Microsoft Excel Misc 0 25th Sep 2009 11:46 AM
Office Update function doesn't update the Outlook '03 junk email f =?Utf-8?B?TWFydHkgUw==?= Microsoft Outlook Discussion 0 31st Mar 2005 03:51 AM
Function in Update To Edro Microsoft Access Queries 1 1st May 2004 10:49 AM
[Vb.net question] how to apply online update function into program (the effect just like Norton system work live update) chan Microsoft Dot NET 0 4th Mar 2004 02:43 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:20 AM.