Importing csv data into worksheet from the web

  • Thread starter Thread starter Oreg
  • Start date Start date
O

Oreg

Hello,

I am having trouble importing comma delimited data into a worksheet
using a form. Below is how my code works. I have a textbox, which
dependent upon what is entered, will later be tacked on to the end of a
url address that will pull up comma delimited data. I've made it this
far, but have no idea how to import that information into a sheet named
"Data". Is it possible to do this ? if so, is it possible to have this
done in the background invisible to the user?

Here's what I have so far:

Private Sub CommandButton6_Click()

With Application
..Calculation = xlManual
End With
ActiveWorkbook.PrecisionAsDisplayed = False
With Application
Dim r As Long
Dim ws1 As Worksheet
Set ws1 = Worksheets("SNEM")
r = ws1.Cells(Rows.Count, 1).End(xlUp).Offset(0, 1).Row
ws1.Range("B" & r).Value = Segm.Value
ws1.Range("C" & r).Formula = "=RC[-2]&RC[-1]"
ws1.Range("D" & r).Formula = "=HYPERLINK(RC[-1])"

If ws1.Range("B" & r).Value > 0 Then
ws1.Range("A" & r).Value =
"http://www.geo.sbc.com/scripts/fnp/export/csv_content.asp?SEGMENT="
Else
ws3.Range("A" & r).Value = ""
End If
..Calculation = xlCalculationManual
Application.ScreenUpdating = False
Application.Visible = False
..ScreenUpdating = False
End With
Call getsnem
End Sub

(call getsnem follows the hyperlink, which opens internet explorer and
pulls the data.....also, the url above is incorrect for security
reasons)


Thanks,

Oreg
 
Hi Tom,

Thanks for the response. I will try the newsgroup you provided for
solutions. I sent you a private message with the full address if that
will help.

Thanks again.

Oreg
 
Back
Top