ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   2003 to 2007 macro problem (https://www.excelbanter.com/excel-worksheet-functions/215181-2003-2007-macro-problem.html)

Russ Morgan

2003 to 2007 macro problem
 
Hello group.

I have a VBA/Macro that I put together in version 2003 that works just fine
and works fast. In 2007 it works but very slowly and makes the screen blink
at, what I believe is each separate line of code. Is there a conversion I
need to do or do I need to rewrite the code over in 2007, or whatever...?



Bob Phillips[_3_]

2003 to 2007 macro problem
 
How about posting the code?

--
__________________________________
HTH

Bob

"Russ Morgan" wrote in message
...
Hello group.

I have a VBA/Macro that I put together in version 2003 that works just
fine and works fast. In 2007 it works but very slowly and makes the
screen blink at, what I believe is each separate line of code. Is there a
conversion I need to do or do I need to rewrite the code over in 2007, or
whatever...?




Shane Devenshire[_2_]

2003 to 2007 macro problem
 
Hi,

We need to know what your code actually is.

--
If this helps, please click the Yes button

Cheers,
Shane Devenshire


"Russ Morgan" wrote:

Hello group.

I have a VBA/Macro that I put together in version 2003 that works just fine
and works fast. In 2007 it works but very slowly and makes the screen blink
at, what I believe is each separate line of code. Is there a conversion I
need to do or do I need to rewrite the code over in 2007, or whatever...?




Russ Morgan

2003 to 2007 macro problem
 
Sorry, here is the first main section.


Private Sub OKButton_Click()

Sheets("Vendor Area").Activate
nextrow = Application.WorksheetFunction.CountA(Range("C:C")) + 1
Cells(nextrow, 3) = EntryDate.Text
Cells(nextrow, 4) = InvoiceNmbr.Text
Cells(nextrow, 6) = TransactionDate.Text
Cells(nextrow, 8) = Purpose.Text
Cells(nextrow, 9) = Amount.Value

If PDprint100 Then Cells(nextrow, 7) = "01-12-2002-100"
If PDprint100 Then Sheets("Printing & Office Supplies").Select
If PDdues140 Then Cells(nextrow, 7) = "01-12-2002-140"
If PDdues140 Then Sheets("Dues & Subscriptions").Select
If PDtravel150 Then Cells(nextrow, 7) = "01-12-2002-150"
If PDtravel150 Then Sheets("Travel, Mtgs, Cont.Ed").Select
If PDgarage Then Cells(nextrow, 7) = "01-12-2002-170"
If PDgarage Then Sheets("Garage Services").Select
If PDtelephone Then Cells(nextrow, 7) = "01-12-2002-210"
If PDtelephone Then Sheets("Telephone").Select
If PDcontracts Then Cells(nextrow, 7) = "01-12-2002-260"
If PDcontracts Then Sheets("Contracts, Maint. & Service").Select
If PDmachequip Then Cells(nextrow, 7) = "01-12-2002-270"
If PDmachequip Then Sheets("Machine & Equipment Repair").Select
If PDuniforms Then Cells(nextrow, 7) = "01-12-2002-410"
If PDuniforms Then Sheets("Uniforms").Select
If PDreserves Then Cells(nextrow, 7) = "01-12-2002-520"
If PDreserves Then Sheets("Reserve Police").Select
If PDsupplies Then Cells(nextrow, 7) = "01-12-2002-710"
If PDsupplies Then Sheets("Supplies").Select
If PDrange Then Cells(nextrow, 7) = "01-12-2002-290"
If PDrange Then Sheets("Range").Select
If PDphysicals Then Cells(nextrow, 7) = "01-12-2002-490"
If PDphysicals Then Sheets("Physicals").Select
If PDdrugs Then Cells(nextrow, 7) = "Drug Funds"
If PDdrugs Then Sheets("Seized Drug Funds").Select
If PDvictims Then Cells(nextrow, 7) = "01-12-2002-281"
If PDvictims Then Sheets("Victim Advocate").Select

If CRTPrinting Then Cells(nextrow, 7) = "01-02-2002-100"
If CRTPrinting Then Sheets("Court - Printing & Supplies").Select
If CRTdues Then Cells(nextrow, 7) = "01-02-2002-140"
If CRTdues Then Sheets("Court - Dues & Subs").Select
If CRTjury Then Cells(nextrow, 7) = "01-02-2002-680"
If CRTjury Then Sheets("Court - Jury Fees").Select
If CRTtravel Then Cells(nextrow, 7) = "01-02-2002-150"
If CRTtravel Then Sheets("Court - Travel, Mtgs, Ed.").Select
If CRTmaint Then Cells(nextrow, 7) = "01-02-2002-260"
If CRTmaint Then Sheets("Court - Maint & Serv.
Contracts").Select
If CRTproserv Then Cells(nextrow, 7) = "01-02-2002-650"
If CRTproserv Then Sheets("Pro Services").Select
If CRTinterp Then Cells(nextrow, 7) = "01-02-2002-651"
If CRTinterp Then Sheets("Court - Interpreter Fees").Select

Range("A9").Select
If Range("a9").Value = "" Then Range("a8").Select Else
Selection.End(xlDown).Select
ActiveCell.Offset(1, 0).Select

If Amount.Value = 500 Then Workbooks.Open ("C:\MyFiles\Standard
Formats\Requisition form.xls")

Unload AddingForm

End Sub




"Bob Phillips" wrote in message
...
How about posting the code?

--
__________________________________
HTH

Bob

"Russ Morgan" wrote in message
...
Hello group.

I have a VBA/Macro that I put together in version 2003 that works just
fine and works fast. In 2007 it works but very slowly and makes the
screen blink at, what I believe is each separate line of code. Is there
a conversion I need to do or do I need to rewrite the code over in 2007,
or whatever...?







All times are GMT +1. The time now is 10:01 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com