PDA

View Full Version : Solved: Loading data into a form



prm
10-21-2005, 10:44 AM
Hi,

How do you load data into a form on a Mac? I have the following code and no matter what data on the spreadsheet is selected, the same data keeps coming up. On the form I have the proper sheet and cell selected "=PRACA!A3" and so on but the data does not load. Is there a command missing or a better way of recalling the data from a spreadsheet?

Sub TextBox4_Click()
Range("A1:t99").AdvancedFilter _
Action:=xlFilterCopy, _
CriteriaRange:=Range("u1:u2"), _
CopyToRange:=Range("v1:ao1"), Unique:=False
Range("w2:ao2").Copy
Sheets("PRACA").Select
Range("A3:s3").Select
Selection.PasteSpecial
Sheets("Select").Select
Range("a2:a99").ClearContents
Range("A2").Select
Application.ScreenUpdating = True
NEXTPRACA1.Show
End Sub

This code works fine on a PC, but not on a Mac. The data is being moved properly, it just doesn't show up on the form.

Any suggestions would be appreciated.

Thank you,
prm

BlueCactus
10-22-2005, 04:33 PM
Is there a Userform_Initialize() routine in the code for the UserForm? I don't see anything in the above code that would load the data, so it's got to be somewhere in the form code.

BC

Edit: I see that the above code is part of the form. But it is not what loads the data, unless I'm misunderstanding the intent.

prm
10-24-2005, 05:02 AM
No there is no Userform_Initialize() routine in the code for the UserForm. I was loading the data from the spreadsheet by using =PRACA!E3 (cell location of data) into the form data fields.

Is there a better way to load the data?

Thank you for your help.

prm

prm
10-24-2005, 08:09 AM
Thanks BlueCactus! I fixed it with help from Jon in the Mac forum.

Thanks again!
prm