LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.misc
 
Posts: n/a
Default Urgent - Run-Time Error "450"

Jeff,

I'm not entirely sure what you're trying to do, but here is some code
that is similar to yours but does not throw and error. HTH

Graham

Sub trimit()
Dim a As Long
Dim myRng As Range
For a = 7 To 100

Set myRng = Sheets('Sheet1").Range("A7:a100")
x = Mid(Application.Trim(myRng.Cells(a)), 12, 20)

If a Mod 2 = 0 Then
If Cells(a, 1).Value 0 Then
Cells(a, 2).Value = x
Else
Cells(a, 2).Value = 0
End If
End If
Next a

End Sub





Jeff wrote:
Hello,
I urgently need help with my VBA procedure. I'm getting the following erro
msg "Run-time '450'
Here's my VBA procedure
Sub trimit()
Dim a As Long
Dim myRng As Range
For a = 7 To 100
x = Mid(Application.Trim(Cells(a, 1).Range), 12, 20)

If a Mod 2 = 0 Then
If Cells(a, 1).Value 0 Then
Cells(a, 2).Value = x
Else
Cells(a, 2).Value = 0
End If
End If
Next a
--
Regards,
Jeff


 
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
Hot key for time? Dave in Des Moines New Users to Excel 2 March 24th 06 04:31 PM
Hot key for time? Dave in Des Moines Excel Worksheet Functions 2 March 24th 06 04:15 PM
time sheet drop down lists Steve Excel Discussion (Misc queries) 12 March 18th 06 10:30 PM
time entry with am/pm and no colons Cyrus Excel Discussion (Misc queries) 9 March 3rd 06 11:42 AM
Formula for a time card skateblade Excel Worksheet Functions 6 November 2nd 05 09:28 PM


All times are GMT +1. The time now is 01:18 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"