Hi
I have ran the following module via Excel 2007 on window XP platform, i have no issue on it. But when i run on Window 7 by using Excel 2007, a debug message pop out in BOLD as follow. I have changed the dir path, it does not work.
Sub ticketcreation()
Dim ws As Worksheet
Dim wb As Workbook
Dim hardstop As Range
Dim gdshs As Range
Dim luptonshs As Range
Set gdshs = ThisWorkbook.Names("gdshs").RefersToRange
Set luptonshs = ThisWorkbook.Names("luptonshs").RefersToRange
Dim FName As String, FPath As String, SYMBOL As String
SYMBOL = Range("G9").Value
If Dir("C:\Users\TURNET\Documents\My Documents\My Excel\TEMP\Order\") = "" Then
FPath = "C:\Documents and Settings\Vickie\My Documents\My Excel\ACL\"
ChDir "C:\Documents and Settings\Vickie\My Documents\My Excel\ACL"
Else
FPath = "C:\Users\TURNET\Documents\My Documents\My Excel\TEMP\Order\"
ChDir "C:\Users\TURNET\Documents\My Documents\My Excel\TEMP\Order"
End If
FName = "Daily Sales_" & Format(Date, "MMMDD_")
clients = Range("B16:B24").Value
DBclients = Range("B28").Value
BoSclients = Range("B31").Value
BrokerAclients = Range("B34").Value
BrokerBclients = Range("B37").Value
numshares = Range("D16:D24").Value
dbnumshares = Range("D28").Value
bosnumshares = Range("D31").Value
brokerAnumshares = Range("D34").Value
BrokerBnumshares = Range("D37").Value
csnum = Range("A16:A24").Value
DBnum = Range("A28").Value
bosnum = Range("A31").Value
brokerAnum = Range("A34").Value
brokerBnum = Range("A37").Value
round_lot = Range("E12").Value
stock = Range("E7:E9").Value
Workbooks.Open FileName:= _
FPath & "Daily Sales CS template.xlsx"
Application.Run "BLPLinkReset"
Set wb = ActiveWorkbook
Range("a29:a37") = csnum
Range("b29:b37") = clients
Range("c29:c37") = numshares
Range("b19") = Date
Range("b20") = Time
Range("B22") = SYMBOL
Range("b23:b25") = stock
Range("b26") = round_lot
Range("A1").Select
wb.SaveAs FPath & FName & SYMBOL & "-CS"
Please help. Highly appreciated. Many thanks
Vickie
Bookmarks