[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

04/08/2004 at 12:08AM PDT, ID: 20947469
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

7.8

Excel macro getting stuck in between

Asked by greatmanu in Visual Basic Programming

Tags: cstr, range

Please see the part of the code below.It just copies some cells from afile and puts it in  another

Set objExcel = CreateObject("Excel.Application")
locfile = "E:\Daily\mar-04\"
Application.Dialogs(xlDialogOpen).Show ("D:\Games")
filenam = ActiveWorkbook.Name


Set objworkbook = objExcel.Workbooks.Open(Filename:=locfile + filenam)
Set objWorkSheet = objworkbook.Worksheets("KR")
curdate = objWorkSheet.Range("E2").Value
' get the date
condate = CStr(curdate)
lendate = Len(condate)
If Mid(condate, 2, 1) = "/" Then
actdate = Mid(condate, 3, lendate - 5)
End If
If Mid(condate, 3, 1) = "/" Then
actdate = Mid(condate, 4, lendate - 6)
End If


'=======================
Workbooks("test.xls").Activate
Sheets("Month").Select
Range("B2").Select
If (actdate = 1) And (ActiveCell.Value <> "") Then
Call deletall
End If


'paste one by one
Total_calls = objWorkSheet.Range("B8").Value
Workbooks("test.xls").Activate
Sheets("Month").Select
TCRow = "E" + CStr(CInt(actdate) + 1)
Range(TCRow).Select
ActiveCell.Value = Total_calls


HLRoc = objWorkSheet.Range("C4").Value
Workbooks("test.xls").Activate
Sheets("Month").Select
TCRow = "B" + CStr(CInt(actdate) + 1)
Range(TCRow).Select
ActiveCell.Value = HLRoc



VLRoc = objWorkSheet.Range("C5").Value
Workbooks("test.xls").Activate
Sheets("Month").Select
TCRow = "C" + CStr(CInt(actdate) + 1)
Range(TCRow).Select
ActiveCell.Value = VLRoc



Succ = objWorkSheet.Range("C8").Value
Workbooks("test.xls").Activate
Sheets("Month").Select
TCRow = "F" + CStr(CInt(actdate) + 1)
Range(TCRow).Select
ActiveCell.Value = Succ



Answ = objWorkSheet.Range("D8").Value
Workbooks("test.xls").Activate
Sheets("Month").Select
TCRow = "G" + CStr(CInt(actdate) + 1)
Range(TCRow).Select
ActiveCell.Value = Answ



CSR = objWorkSheet.Range("E8").Value
Workbooks("test.xls").Activate
Sheets("Month").Select
TCRow = "H" + CStr(CInt(actdate) + 1)
Range(TCRow).Select
ActiveCell.Value = CSR



ASR = objWorkSheet.Range("F8").Value
Workbooks("test.xls").Activate
Sheets("Month").Select
TCRow = "I" + CStr(CInt(actdate) + 1)
Range(TCRow).Select
ActiveCell.Value = ASR


TSMS = objWorkSheet.Range("F9").Value
Workbooks("test.xls").Activate
Sheets("Month").Select
TCRow = "J" + CStr(CInt(actdate) + 1)
Range(TCRow).Select
ActiveCell.Value = TSMS


BHMS = objWorkSheet.Range("I9").Value
Workbooks("test.xls").Activate
Sheets("Month").Select
TCRow = "K" + CStr(CInt(actdate) + 1)
Range(TCRow).Select
ActiveCell.Value = BHMS



VMSM = objWorkSheet.Range("I10").Value
Workbooks("test.xls").Activate
Sheets("Month").Select
TCRow = "M" + CStr(CInt(actdate) + 1)
Range(TCRow).Select
ActiveCell.Value = VMSM




BHCAs = objWorkSheet.Range("G5").Value
Workbooks("test.xls").Activate
Sheets("Month").Select
TCRow = "N" + CStr(CInt(actdate) + 1)
Range(TCRow).Select
ActiveCell.Value = BHCAs


HBS = objWorkSheet.Range("C6").Value
Workbooks("test.xls").Activate
Sheets("Month").Select
TCRow = "D" + CStr(CInt(actdate) + 1)
Range(TCRow).Select
ActiveCell.Value = HBS



VMSa = objWorkSheet.Range("F10").Value
Workbooks("test.xls").Activate
Sheets("Month").Select
TCRow = "L" + CStr(CInt(actdate) + 1)
Range(TCRow).Select
ActiveCell.Value = VMSa

ActiveWorkbook.Save
objworkbook.Activate
objworkbook.Close
Set objExcel = Nothing
Set objworkbook = Nothing
Set objWorkSheet = Nothing
UserForm_Terminate
End Sub

The program does not terminate.I don't know where it is getting stuck but the screen goes white as if in need of memory.After a few minutesit says "Microsoft excel waiting for an application to complete OLE action.

If i see the task manager,i see instance of two EXCEL.EXE.Please help..this is urgent
 
Keywords: Excel macro getting stuck in between
 
Loading Advertisement...
 
[+][-]04/10/04 09:07 AM, ID: 10797238

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04/10/04 10:06 AM, ID: 10797480

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06/07/04 07:00 PM, ID: 11255126

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 30-day free trial to view this Administrative Comment or ask the Experts your question.

 
[+][-]06/26/04 04:15 PM, ID: 11407797

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 30-day free trial to view this Administrative Comment or ask the Experts your question.

 
[+][-]06/30/04 02:51 PM, ID: 11441346

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Visual Basic Programming
Tags: cstr, range
Sign Up Now!
Solution Provided By: modulo
Participating Experts: 1
Solution Grade: A
 
 
 
Loading Advertisement...
20090824-EE-VQP-74