LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Trouble when trying to call a sub

People, I'm trying to call a sub from a form, but the message "Sub or
Function not defined" appears when compiled.

That is the following code:

Sub Macro1()




For i = 3 To 100



Set oBk = Workbooks.Open(link)

iefile = ActiveWorkbook.Name
Call HTMLText2_Click
sdr = Cells(10, 1).Value
Range(Cells(10, 2), Cells(10, 3)).Select
Selection.Copy
Range("J9").Select
Selection.PasteSpecial Paste:=xlPasteValues
cmt = Cells(9, 10).Value
sdis = Cells(10, 5).Value
Range(Cells(10, 6), Cells(10, 7)).Select
Selection.Copy
Range("J10").Select
Selection.PasteSpecial Paste:=xlPasteValues
audit = Cells(10, 10).Value
Workbooks(iefile).Close (0)
Cells(i, 12) = sdr
Cells(i, 13) = cmt
Cells(i, 14) = sdis
Cells(i, 15) = audit
End If

Next i

End Sub

--

Sub HTMLText2_Click()
Cells(1, 10) = HTMLText2.Value
End Sub

--

I tried to use the Call Method, and only writing the name of the sub in
the code... But the error still appear.


Somebody help meeeeeeeeeee....

 
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
Call Center Management: How to calculate 'cost per call' Denniso6 Excel Discussion (Misc queries) 2 June 25th 06 05:01 PM
Trouble call VB ActiveX dll from Excel Kurt M. Sanger Excel Programming 1 October 17th 04 02:43 PM
call sub mike allen[_2_] Excel Programming 3 October 15th 04 04:54 PM
How do you call one Sub from another Sub ? lothario[_30_] Excel Programming 2 October 17th 03 01:47 PM
DLL Call No Name Excel Programming 1 October 16th 03 01:34 PM


All times are GMT +1. The time now is 09:06 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"