View Single Post
  #10   Report Post  
Posted to microsoft.public.excel.misc
Mark[_12_] Mark[_12_] is offline
external usenet poster
 
Posts: 10
Default How to extract email addresses from 1 worksheet to another workbook

Tried Ron's and it works to a degree. If I have the specified file
open already it will extract all emails perfectly.

However as I mentioned above it will need to open multiple workbooks
from a folder. I currently have the following extra code in addition
to Rons but it is not opening any workbooks.


Dim MyPath As String, FilesInPath As String
Dim MyFiles() As String
Dim FNum As Long

MyPath = "\\mypath"

FNum = 0
Do While FilesInPath < ""
FNum = FNum + 1
ReDim Preserve MyFiles(1 To FNum)
MyFiles(FNum) = FilesInPath
FilesInPath = Dir()
Loop


If FNum 0 Then
For FNum = LBound(MyFiles) To UBound(MyFiles)
Set wb = Nothing
On Error Resume Next
Set wb = Workbooks.Open(MyPath & MyFiles(FNum))
On Error GoTo 0


However no workbooks try to open.

This is a work project btw and I'll be off from now for the next 48
hours so most likely wont look here again until then.

Thanks again for the help.