Results 1 to 4 of 4

Thread: Updating Range with Visual FoxPro Array

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #2
    VBAX Master Norie's Avatar
    Joined
    Jan 2005
    Location
    Stirling, Scotland
    Posts
    1,831
    Location
    I just tried this code in VBA and it worked.
    Option Base 1
    
    Sub Test
        Dim DataArray(100, 3)
        For r = 1 To 100
            DataArray(r, 1) = "ORD " & r
            DataArray(r, 2) = Rnd() * 1000
            DataArray(r, 3) = DataArray(r, 2) * 0.7
        Next
        Set oSheet = Worksheets(1)
        oSheet.Range("A2").Resize(100, 3).Value = DataArray
    End Sub
    Last edited by Aussiebear; 01-23-2025 at 01:28 PM.

Posting Permissions

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