-
Windows 7 external file open
I have the following code
[VBA]Sub cmdbtnFetchFile_Click()
Dim strAddress As String, res As String
Application.CutCopyMode = False
Selection.Copy
ChDir "C:\"
Workbooks.Open Filename:="C:\SN barcodes.xls"
Sheets("Barcodes").Select
Range("B2").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("A2:A65536").Select
Selection.ClearContents
Range("B2:B65536").Select
Selection.Cut
Range("A2").Select
ActiveSheet.Paste
ActiveWorkbook.Save
ActiveWorkbook.Close
On Error GoTo NoFile
strAddress = "C:\Incoming grabber.lab"
ActiveWorkbook.FollowHyperlink Address:=strAddress
Exit Sub
NoFile:
MsgBox "Sorry. File is not available at this time", vbInformation, "Error!"
End Sub[/VBA]
This works perfectly, but now having issues with it working on a Windows 7 PC.
It appears it's failing because it's not opening the "Incoming grabber.lab" file as an administrator.
Can someone modify this to work for windows 7?
-
Did you connect the lab extension in windows7 to a program with which it can be opened ?
-
Yes, if you open the file by it's self it will open, but it would need to be opened by right clicking and selecting open as administrator
-
i thing friends it's a issue for windows 7 compatibility so check that compatibility must be fine...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules