<hr style="background-color: rgb(235, 235, 235); color: rgb(235, 235, 235);" size="1"> <!-- / icon and title --><!-- message -->
<!-- BEGIN TEMPLATE: ad_showthread_firstpost_start --><!-- END TEMPLATE: ad_showthread_firstpost_start -->I have an Excel file, compiled with DoneEx Compiler, with extensive calculations/iterations and approximately 30 pages of VBA code. So far, it has been trialed on 4 computers, including my own PC. My PC runs Win Vista with Excel 2003, one PC runs Win XP with Excel 2003, and 2 PC's run Win 7 with Excel 2007. All of the code executes on all computers except one with Win 7 and Excel 2007. I have the below code to insert a .bmp "flowsheet" picture, followed by adding some labels and values surrounding the flowsheet. On that 1 PC, the "flowsheet" .bmp inserts at cell B4, or even half way across cell A4, thus blocking much of the critical input/output data in cells A4 to about H20. From my code below, it should insert at cell E135. Labels and data insert properly. We've tried to play with his screen resolution, 1280 x 800, plus and minus. I also inserted a 2 sec. delay between the calcs and the final step which is the insertion of the .bmp file and labels as below. None of this has worked. I find it curious that this compiled file works perfectly on a similar PC with the same op. system and the same version of Excel. Can you help me? He has SP2 for Excel 2007 installed. Any suggestions on how to cure this issue?
Thanks for the help,
Brant
InsertPicture:
ActiveSheet.Unprotect ("xxxx")
If FLOWSHEET = "1E X 1S" Then
Range("E133.S154").Value = "" 'clears the last set of labels and data points;
'other code is used to clear/delete the flowsheet.bmp pic.
With ActiveSheet.Pictures.Insert("C:\program files\CuPRO-Calc\flowsheets\1Ex1SsubPic1.bmp")
.Left = Range("E135").Left
.Top = Range("E135").Top
End With
ActiveSheet.Protect ("xxxx")
Range("D141").Value = Range("B8").Value
Range("C141").Value = "PLS g/l="
Range("G146").Value = Range("S21").Value
Range("F146").Value = "Raff. g/l="
Range("M141").Value = Range("T28").Value
Range("L141").Value = "SE g/l="
Range("I146").Value = Range("T29").Value
Range("H146").Value = "PE g/l="
Range("M139").Value = Range("S28").Value
Range("L139").Value = "SO g/l="
Range("M138").Value = Range("S29").Value
Range("L138").Value = "LO g/l="
Range("B74") = "Complete!"
Range("J13") = "Complete!"
Range("J14") = "None."
Range("B135") = "None."
Range("B8").Select
End
End If
ActiveSheet.Unprotect ("xxxx")
If FLOWSHEET = "2E X 2S" Then
Range("E133.S154").Value = "" 'clears the last set of labels and data points; other code is used to clear/delete the flowsheet.bmp pic.
With ActiveSheet.Pictures.Insert("C:\program files\CuPRO-Calc\flowsheets\2Ex2SsubPic1.bmp")
.Left = Range("E135").Left
.Top = Range("E135").Top
End With
ActiveSheet.Protect ("xxxx")
Range("D141").Value = Range("B8").Value
Range("C141").Value = "PLS g/l="
Range("G146").Value = Range("S21").Value
Range("F146").Value = "Raff. g/l="
Range("M141").Value = Range("T28").Value
Range("L141").Value = "SE g/l="
Range("I146").Value = Range("T29").Value
Range("H146").Value = "PE g/l="
Range("M139").Value = Range("S28").Value
Range("L139").Value = "SO g/l="
Range("M138").Value = Range("S29").Value
Range("L138").Value = "LO g/l="
Range("B74") = "Complete!"
Range("J13") = "Complete!"
Range("J14") = "None."
Range("B135") = "None."
Range("B8").Select
End
End If
<!-- / message --><!-- BEGIN TEMPLATE: ad_showthread_firstpost_sig --><!-- END TEMPLATE: ad_showthread_firstpost_sig -->
<!-- BEGIN TEMPLATE: ad_showthread_firstpost_start --><!-- END TEMPLATE: ad_showthread_firstpost_start -->I have an Excel file, compiled with DoneEx Compiler, with extensive calculations/iterations and approximately 30 pages of VBA code. So far, it has been trialed on 4 computers, including my own PC. My PC runs Win Vista with Excel 2003, one PC runs Win XP with Excel 2003, and 2 PC's run Win 7 with Excel 2007. All of the code executes on all computers except one with Win 7 and Excel 2007. I have the below code to insert a .bmp "flowsheet" picture, followed by adding some labels and values surrounding the flowsheet. On that 1 PC, the "flowsheet" .bmp inserts at cell B4, or even half way across cell A4, thus blocking much of the critical input/output data in cells A4 to about H20. From my code below, it should insert at cell E135. Labels and data insert properly. We've tried to play with his screen resolution, 1280 x 800, plus and minus. I also inserted a 2 sec. delay between the calcs and the final step which is the insertion of the .bmp file and labels as below. None of this has worked. I find it curious that this compiled file works perfectly on a similar PC with the same op. system and the same version of Excel. Can you help me? He has SP2 for Excel 2007 installed. Any suggestions on how to cure this issue?
Thanks for the help,
Brant
InsertPicture:
ActiveSheet.Unprotect ("xxxx")
If FLOWSHEET = "1E X 1S" Then
Range("E133.S154").Value = "" 'clears the last set of labels and data points;
'other code is used to clear/delete the flowsheet.bmp pic.
With ActiveSheet.Pictures.Insert("C:\program files\CuPRO-Calc\flowsheets\1Ex1SsubPic1.bmp")
.Left = Range("E135").Left
.Top = Range("E135").Top
End With
ActiveSheet.Protect ("xxxx")
Range("D141").Value = Range("B8").Value
Range("C141").Value = "PLS g/l="
Range("G146").Value = Range("S21").Value
Range("F146").Value = "Raff. g/l="
Range("M141").Value = Range("T28").Value
Range("L141").Value = "SE g/l="
Range("I146").Value = Range("T29").Value
Range("H146").Value = "PE g/l="
Range("M139").Value = Range("S28").Value
Range("L139").Value = "SO g/l="
Range("M138").Value = Range("S29").Value
Range("L138").Value = "LO g/l="
Range("B74") = "Complete!"
Range("J13") = "Complete!"
Range("J14") = "None."
Range("B135") = "None."
Range("B8").Select
End
End If
ActiveSheet.Unprotect ("xxxx")
If FLOWSHEET = "2E X 2S" Then
Range("E133.S154").Value = "" 'clears the last set of labels and data points; other code is used to clear/delete the flowsheet.bmp pic.
With ActiveSheet.Pictures.Insert("C:\program files\CuPRO-Calc\flowsheets\2Ex2SsubPic1.bmp")
.Left = Range("E135").Left
.Top = Range("E135").Top
End With
ActiveSheet.Protect ("xxxx")
Range("D141").Value = Range("B8").Value
Range("C141").Value = "PLS g/l="
Range("G146").Value = Range("S21").Value
Range("F146").Value = "Raff. g/l="
Range("M141").Value = Range("T28").Value
Range("L141").Value = "SE g/l="
Range("I146").Value = Range("T29").Value
Range("H146").Value = "PE g/l="
Range("M139").Value = Range("S28").Value
Range("L139").Value = "SO g/l="
Range("M138").Value = Range("S29").Value
Range("L138").Value = "LO g/l="
Range("B74") = "Complete!"
Range("J13") = "Complete!"
Range("J14") = "None."
Range("B135") = "None."
Range("B8").Select
End
End If
<!-- / message --><!-- BEGIN TEMPLATE: ad_showthread_firstpost_sig --><!-- END TEMPLATE: ad_showthread_firstpost_sig -->
<!-- controls -->
Last edited by a moderator: