|
-
Jun 27th, 2005, 09:11 AM
#1
Thread Starter
Lively Member
Very Urgent....pls help (Resolved)
Hi,
I hope someone would be able to help. Thanx
I have got two excel files. "Test1.xsl" and "Test2.Excel". I have written the following code.
Test1.xsl
VB Code:
Sub Product_Development()
Set wBook = Workbooks("Test2.xls")
wBook.Sheets("Sheet1").Activate
If wBook Is Nothing Then 'Not open
MsgBox "Workbook is not open", _
vbCritical, "OzGrid.com"
Set wBook = Nothing
On Error GoTo 0
Else 'It is open
MsgBox "Yes it is open", _
vbInformation, "OzGrid.com"
Set wBook = Nothing
On Error GoTo 0
End If
Range("A1").Select
ActiveCell.Offset(0, 0) = "Product Development"
'Dim frm As Object
'Dim test
'frm.OpenNewLeadEntryForm
'MsgBox test
' wBook.
' open new initiative form in internal funnel
End Sub
How do i call a functionshown below that is in "Test2.xsl" from the above code?
VB Code:
Sub OpenNewLeadEntryForm()
Application.ScreenUpdating = False
frmNewLeadEntry.Show
'cell = "Product Development"
End Sub
This is very urgent. I hope someone can help me. Thanx
Last edited by sand; Jun 27th, 2005 at 09:01 PM.
-
Jun 27th, 2005, 09:34 AM
#2
Re: Very Urgent....pls help
Application.Run "test2.xls!Sheet1.OpenNewLeadEntryForm"
change sheet1 to sheet no or thisworkbook, or module name as required
pete
-
Jun 27th, 2005, 09:59 AM
#3
Thread Starter
Lively Member
Re: Very Urgent....pls help
Hi,
After using the code given, i get the follwoing error message.
"
Runtime error '380'
Could not set the value property. Invalid property value. "
-
Jun 27th, 2005, 10:00 AM
#4
Thread Starter
Lively Member
Re: Very Urgent....pls help
Hi,
After using the code given, i get the follwoing error message.
"
Runtime error '380'
Could not set the value property. Invalid property value. "
The above error points to the follwing code
-
Jun 27th, 2005, 10:04 AM
#5
Re: Very Urgent....pls help
you might need to set test2 as the active workbook
windows("Test2.xls").activate
or try prefix the form, with the worksheet similar to the macro
pete
-
Jun 27th, 2005, 10:11 AM
#6
Thread Starter
Lively Member
Re: Very Urgent....pls help
Hi,
I still get the error message
-
Jun 27th, 2005, 10:15 AM
#7
Re: Very Urgent....pls help
sorry i am out of ideas, if you want to post a sample of the 2 spreadsheets someone may well look at it for you, but i won't now till tomorrow
pete
-
Jun 27th, 2005, 09:01 PM
#8
Thread Starter
Lively Member
Re: Very Urgent....pls help
I have managed to solve it thanx.
-
Jun 28th, 2005, 06:13 AM
#9
Re: Very Urgent....pls help (Resolved)
Hey, post up how you solved it - even if it is simple, then we can also know how you did it... and congrats btw in fixing it
Feeling like a fly on the inside of a closed window (Thunk!)
If I post a lot, it is because I am bored at work! ;D Or stuck...
* Anything I post can be only my opinion. Advice etc is up to you to persue...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|