Click here to Skip to main content
15,879,184 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: My Application takes Very CPU usage and Memory Pin
Dave Kreskowiak29-Jan-09 3:18
mveDave Kreskowiak29-Jan-09 3:18 
GeneralRe: My Application takes Very CPU usage and Memory Pin
Dave Kreskowiak29-Jan-09 3:17
mveDave Kreskowiak29-Jan-09 3:17 
GeneralRe: My Application takes Very CPU usage and Memory Pin
Anubhava Dimri29-Jan-09 19:44
Anubhava Dimri29-Jan-09 19:44 
GeneralRe: My Application takes Very CPU usage and Memory Pin
Dave Kreskowiak30-Jan-09 1:55
mveDave Kreskowiak30-Jan-09 1:55 
GeneralRe: My Application takes Very CPU usage and Memory Pin
Anubhava Dimri29-Jan-09 22:18
Anubhava Dimri29-Jan-09 22:18 
GeneralRe: My Application takes Very CPU usage and Memory Pin
Ashutosh Phoujdar29-Jan-09 23:16
Ashutosh Phoujdar29-Jan-09 23:16 
GeneralRe: My Application takes Very CPU usage and Memory Pin
Anubhava Dimri30-Jan-09 0:59
Anubhava Dimri30-Jan-09 0:59 
QuestionHow to copy conditional rows and paste them in new worksheet. Pin
jptxrose28-Jan-09 10:56
jptxrose28-Jan-09 10:56 
I have tried to copy from Sheets("S") rows meeting condition and copy those rows to a new sheet, but not able to get the code to work. Here is my code. What could I be doing wrong?

Here is the spreadsheet fields.
Date Requested	Requesting Entity	Information Requested	Contact Name	Contact Telephone/Email	OIG Contact	OIG Contact Telephone/Email	"Deadline Back
to Requesting Entity"	"Deadline to theOIG Contact"	"Actual Date Returned
to the OIG Contact"	Status	Comments


There is a funciton in A5 that sets the condition:

A4= 1/29/09 or =today
i12 and k12 contain dates

variable dates are being swapped out for Sheets("D").Cell("c9") based on whether the funtion computes to True for the selected row.

Funcitonion assigned to Cell A5:
=IF(S!A4<S!I12,IF(S!K12<>"Completed",S!C10," ")," ")

'Try this where you fire from the source sheet. Change wks2 to your
'destination sheet conditionally copy rows to another worksheet

'Declare variables

Sub findNew()
Dim rCell As Range
Dim D As Worksheet
Dim S As Worksheet
Dim SL As Range
Dim RD As Range
Dim RS As Range
Dim RA As Range
Dim RB As Range
Dim RC As Range
Dim RE As Range
Dim compDate As Boolean

'Initialize the worksheets
Set S = Sheets.Item("S")
Set D = Sheets.Item("D")

'Initialize the Ranges
Set RA = Sheets.Item("S").Range("a4")
Set RB = Sheets.Item("S").Range("I12")
Set RC = Sheets.Item("S").Range("K12")
Set R1 = Sheets.Item("D").Range("C9")
Set R2 = Sheets.Item("S").Range("C10")
Set RD = Sheets.Item("D").Range("a8:l8")
Set RS = Sheets.Item("S").Range("a8:l8")

'Initialize the Function in cell a5 from Sheet "s"

Set Sheets.Item("S").compDate = Sheets.Item("S").cell(a5)

'Select the Source Worksheet
Sheets("S").Select

'Set up Loop
For Each rCell In RD
rCell.Activate
'For i = 1 To Cells(8.Count, "a").End(xlUp).Row
'Run compDate for Sheets("S").Cell(5,1)to evaluate row

If compDate = True Then
Sheets("S").Select
Range("RS").Select
ActiveSheet.Copy
Sheets("D").Select
Range("R1").Select
Range("R2").Paste
Sheets.Item("D").cell(C9) = S!C10

Else
Sheets.Item("D").cell(C9) = " "
Exit For

End If

Next rCell

'Find LastRow in Worksheet "D" and increase values of input
'Set RB = Worksheet.Sheets("D").Range("a8:l8")
'If (S!A4<S1!I14,IF(S!K14<>"Completed",S!C9," "),S!C10)
'Continue with copy Paste Function
'Set Worksheet.Sheets("S") = ActiveSheet


End Sub
QuestionAutoscroll in textbox Pin
Kschuler28-Jan-09 5:17
Kschuler28-Jan-09 5:17 
AnswerRe: Autoscroll in textbox Pin
Mr Oizo28-Jan-09 22:47
Mr Oizo28-Jan-09 22:47 
GeneralRe: Autoscroll in textbox Pin
Kschuler29-Jan-09 4:25
Kschuler29-Jan-09 4:25 
Questioncould not find installable ISAM Pin
NaliniNagarajan28-Jan-09 2:56
NaliniNagarajan28-Jan-09 2:56 
AnswerRe: could not find installable ISAM Pin
Dave Kreskowiak29-Jan-09 3:14
mveDave Kreskowiak29-Jan-09 3:14 
QuestionProblem running remote process using WMI [modified] Pin
thecornflake28-Jan-09 2:07
thecornflake28-Jan-09 2:07 
AnswerRe: URGENT problem running remote process using WMI Pin
EliottA28-Jan-09 2:55
EliottA28-Jan-09 2:55 
GeneralRe: URGENT problem running remote process using WMI Pin
thecornflake28-Jan-09 3:09
thecornflake28-Jan-09 3:09 
GeneralRe: URGENT problem running remote process using WMI Pin
EliottA28-Jan-09 3:19
EliottA28-Jan-09 3:19 
GeneralRe: URGENT problem running remote process using WMI Pin
thecornflake28-Jan-09 3:21
thecornflake28-Jan-09 3:21 
GeneralRe: URGENT problem running remote process using WMI Pin
thecornflake28-Jan-09 4:32
thecornflake28-Jan-09 4:32 
GeneralRe: URGENT problem running remote process using WMI Pin
Uros Calakovic28-Jan-09 5:29
Uros Calakovic28-Jan-09 5:29 
GeneralRe: URGENT problem running remote process using WMI Pin
thecornflake28-Jan-09 5:50
thecornflake28-Jan-09 5:50 
Questionhow to develop print dialog box Pin
vidhish27-Jan-09 23:37
vidhish27-Jan-09 23:37 
AnswerRe: how to develop print dialog box Pin
dan!sh 28-Jan-09 0:04
professional dan!sh 28-Jan-09 0:04 
QuestionHelp Pin
yaya_star27-Jan-09 21:15
yaya_star27-Jan-09 21:15 
AnswerRe: Help Pin
Ashutosh Phoujdar27-Jan-09 21:29
Ashutosh Phoujdar27-Jan-09 21:29 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.