Runtime error: 438. My Userform Code wont work. Please check what 'm doing wrong...

pedie

Well-known Member
Joined
Apr 28, 2010
Messages
3,875
It errors in underlined line.
Code:
[/FONT]
[FONT=Courier New]Private Sub Update_Click()
 Dim x As String
 x = Me.PathCtxt.Value
 
[B][U] If Application.WorksheetFunction.Right(x, 1).Value = "/" Then[/U][/B]
    Sheets("AList").Range("D1").Value = x
    Call Makeinvis
 Else
    Sheets("AList").Range("D1").Value = x & "\"
 End If
End Sub
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
Mike, Thanks alot! please advice on how can i determine if the text entered in userform textbox is ending with "\"?

Thanks again
 
Upvote 0
Sorry, my bad.... i was using ".value" that was the prob.
Thanks everyone, thanks Mike!
 
Upvote 0

Forum statistics

Threads
1,224,537
Messages
6,179,408
Members
452,912
Latest member
alicemil

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top