View Full Version : Referencing a closed external workbook - VBA

01-09-2013, 01:57 AM
Hey guys, first time poster here... and a desperate one too LOL

Ok, so I have a VBA program, that is part up and running, what i need to know how to do is the following:

My first form simply has a submit button "submitbtn", and a text box "idtb", i want to be able to enter an ID in this box, and press submit so that my next form (with the several text boxes on "nametb" "timetb" "idtb" and a yes and no tick box.) will pull the records off of another workbook.

So I need to link these text boxes with records in another workbook, titled "Team P.xls", i have worked out how to load this file via a button control, and to keep it hidden from the users view, i just cannot work out how to link the text boxes to the data/cells.

A function to be implemented after the above is working, would be press Next and Previous buttons, "nextbtn" and "prevbtn", to scroll through each record with the text boxes updating as i go.

The save function is pretty much straight forward once i have got the linking sorted. So any help on this would be greatly appreciated!

I have been searching for help for hours now, and i'm the current stage of.... :banghead:

thanks in advance,

01-09-2013, 06:07 AM
textbox1.text=workbooks("Team P.xls").sheets(1).cells(1,4).value