![]() |
open an other workbook to eddit
i have a form to make an order, but i have to get an ordernumber fro another excel workbook. now i want to make a button to open the workbook that contains th ordernumbers and make it the active workbook. can anyone help me with thi -- eyesonly196 ----------------------------------------------------------------------- eyesonly1965's Profile: http://www.excelforum.com/member.php...fo&userid=3419 View this thread: http://www.excelforum.com/showthread.php?threadid=54124 |
open an other workbook to eddit
Try Workbooks.Open Filename:="YourFileLocationHere" where you file location might be as follows: "C:\Folder1\Folder2\SubFolder1\FileName" An easy way to make sure you get the correct file name is to do a Record Macro when selecting the file and using that code. eyesonly1965 Wrote: i have a form to make an order, but i have to get an ordernumber from another excel workbook. now i want to make a button to open the workbook that contains the ordernumbers and make it the active workbook. can anyone help me with this -- Ikaabod ------------------------------------------------------------------------ Ikaabod's Profile: http://www.excelforum.com/member.php...o&userid=33371 View this thread: http://www.excelforum.com/showthread...hreadid=541244 |
open an other workbook to eddit
that is what i had found out but the problem is that i can't make the new workbook active without closing my form, and this is what i'm trying to prevent. thanx for the tip -- eyesonly1965 ------------------------------------------------------------------------ eyesonly1965's Profile: http://www.excelforum.com/member.php...o&userid=34199 View this thread: http://www.excelforum.com/showthread...hreadid=541244 |
open an other workbook to eddit
I see what you're getting at. Check out this post: http://www.excelforum.com/showpost.p...28&postcount=2 I think that should put you on the right track. eyesonly1965 Wrote: that is what i had found out but the problem is that i can't make the new workbook active without closing my form, and this is what i'm trying to prevent. thanx for the tip -- Ikaabod ------------------------------------------------------------------------ Ikaabod's Profile: http://www.excelforum.com/member.php...o&userid=33371 View this thread: http://www.excelforum.com/showthread...hreadid=541244 |
open an other workbook to eddit
well finaly i got it. and it works the final code is: -Private Sub cmdBestelnummerOpvragen_Click() Workbooks.Open Filename:="C:\Documents and Settings\leon\Bureaublad\groupagelijst.xls" frmBestellijst.Hide End Sub- but the next problem accurred. when i closed my ordernumber workbook, the workbook that i am working in showed the sheet and not my form. and this is what i'm preventing to show to the users, so when i close my openend workbook my form should apear on top again. i have fixed this by adding the following code to my workbook. -Private Sub Workbook_WindowActivate(ByVal Wn As Window) frmBestellijst.Show End Sub - so now it works the way i want it, thanx for the help -- eyesonly1965 ------------------------------------------------------------------------ eyesonly1965's Profile: http://www.excelforum.com/member.php...o&userid=34199 View this thread: http://www.excelforum.com/showthread...hreadid=541244 |
All times are GMT +1. The time now is 11:20 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com