Consulting

Results 1 to 4 of 4

Thread: Solved: Loading data into a form

  1. #1
    VBAX Regular
    Joined
    Oct 2005
    Posts
    8
    Location

    Solved: Loading data into a form

    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?

    [VBA] 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
    [/VBA]
    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

  2. #2
    VBAX Tutor
    Joined
    Mar 2005
    Posts
    268
    Location
    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.

  3. #3
    VBAX Regular
    Joined
    Oct 2005
    Posts
    8
    Location
    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

  4. #4
    VBAX Regular
    Joined
    Oct 2005
    Posts
    8
    Location
    Thanks BlueCactus! I fixed it with help from Jon in the Mac forum.

    Thanks again!
    prm

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •