View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
Richard Shelley Richard Shelley is offline
external usenet poster
 
Posts: 1
Default Excel programming -- Thank you very much!

Jenny,
I was in a similar position having done Microsoft Access for several
years. I developed an Excel application using VBA. I found the first
differences were in referencing cells between worksheets and trying to
figure this out.

Here is a way of doing it:
Worksheets("Sheet1").Cells(17, 1).Value - this gives the values in sheet
1 in that particular cell.

There are also some neat commands for accessing files for example on a
share drive - you can find help with these in Excel VBA help.
Set fs = Application.FileSearch
With fs
.LookIn = "S:\Trace\Trace-" & yr & fld
'"C:\Miscellaneous\business\Download MAr 05\Trace-" & yr & fld '
.Filename = sdr & "*.SP"
If .Execute 0 Then
MsgBox "There were " & .FoundFiles.Count & " file(s)
found." & Chr(10) & "Side " & sd
For i = 1 To .FoundFiles.Count
x = .FoundFiles(i)
mbr = MsgBox(x, 4, "Files found")
If mbr = 6 Then
mbrt = "Yes"
Else
mbrt = "No"
End If
'MsgBox "You chose " & mbrt
If mbr = 6 Then ' yes
Worksheets("References").Cells(fcnt + 2,
2).Value = x
Worksheets("References").Cells(fcnt + 2,
4).Value = sd
Worksheets("References").Cells(fcnt + 2,
8).Value = an
Worksheets("References").Cells(fcnt + 2,
5).Value = CTyp
If rtmn < 0.01 Then
rta = rt & " < " & rtmx & " %"
Else
If rtmx 99.9 Then
rta = rt & " " & rtmn & " %"
Else
rta = rt & " " & rtmn & " %, and < " &
rtmx & " %"
End If
End If
rta2 = rta & wv & " Side " & sd & Chr(10) & "Pol
" & pl
Worksheets("References").Cells(fcnt + 2,
6).Value = rta2 & ", AOI " & aoi & " deg"
Worksheets("References").Cells(fcnt + 2,
9).Value = rort & " % " & Chr(10) & rta2 & Chr(10) & "AOI " & aoi & "
deg"
fcnt = fcnt + 1
End If
Next i
Else
MsgBox "There were no files found."
End If
End With
Any more info - let me know- Richard


*** Sent via Developersdex http://www.developersdex.com ***