LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default Macro VBA Help please :)

there were a few typos in my code. There are additional macros in your code
that you didn't post. the following line won't work unless there if a
function in your workbook called gettab

Set TargetWs = gettab("tab1")





Sub CreateTab1()

Dim TargetWs As Worksheet
Set TargetWs = gettab("tab1")

Set Sourcews = Worksheets("Addtl Products")

With TargetWs

.Range("B3") = "Developers"
.Range("C3") = Worksheets("Planner").Range("B5")
TargetRow = 4
End With

With Sourcews
SourceRow = 12
Do While .Range("C" & SourceRow) < ""
TargetWs.Range("C" & TargetRow) = .Range("C" & SourceRow).Value

TargetWs.Range("D" & TargetRow) = .Range("B" & SourceRow).Value
TargetWs.Range("E" & TargetRow) = .Range("D" & SourceRow).Value
TargetRow = TargetRow + 1
SourcerowCount = SourcerowCount + 1
Loop
End With

TargetWs.Range("B" & TargetRow) = "Project Price"

Set rPart = Worksheets("Addtl Products").Range("C12")

End Sub


"Heather" wrote:

hi Phil, sorry, I'm new to this so I'm not completely sure what you mean by
assigning them values?

"Phil Hibbs" wrote:

Looks like Joel introduced the Sourcerow and Targetrow variables to
store the row numbers that you had hard coded. You need to define
these variables and assign them values.

Phil Hibbs.

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro recorded... tabs & file names changed, macro hangs Steve Excel Worksheet Functions 3 October 30th 09 11:41 AM
AutoRun Macro with a delay to give user the choice to cancel the macro wanderlust Excel Programming 2 September 28th 07 04:09 PM
Macro Help Needed - Excel 2007 - Print Macro with Auto Sort Gavin Excel Worksheet Functions 0 May 17th 07 01:20 PM
Macro not showing in Tools/Macro/Macros yet show up when I goto VBA editor [email protected] Excel Programming 2 March 30th 07 07:48 PM
Start Macro / Stop Macro / Restart Macro Pete[_13_] Excel Programming 2 November 21st 03 05:04 PM


All times are GMT +1. The time now is 04:41 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"