|
-
Feb 7th, 2005, 12:33 PM
#1
Thread Starter
Junior Member
Re: Telling VBA to find a cell, row, column, range
Oh, I didn't know that... thanks...
Type mismatch is in row 2, 7,10...
Also row 2,3,7,8 when I dubug and move mouse over them the values show "Nothing" or ""
Thanks,
John
-
Feb 7th, 2005, 01:11 PM
#2
Re: Telling VBA to find a cell, row, column, range
Ok, where are the variables defined?
It looks like rRow needs to be dimmed as a Range since you are setting it to a range.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Feb 7th, 2005, 01:26 PM
#3
Thread Starter
Junior Member
Re: Telling VBA to find a cell, row, column, range
I am trying to hard code it in a little... however I am having problems with my select case down there in the code... I need that 10 to be static... cause i have Columns 10, 12, 14,... 22 to test against. should the 10 go on the other side of the "=" or how should I refer to it...
2ndly is "oMarketSheet.Columns(rCount, ColAccntE)" syntaxed properly?
Thanks much...
John
VB Code:
Dim rCount As Integer
Dim ColDate As Integer
Dim ColAccntB As Integer
Dim ColAccntE As Integer
Dim ColRev As Integer
rCount = 11
ColDate = 2
ColAccntB = 10
ColAccntE = 22
ColRev = 11
'For oMarketSheet.Rows(rCount,) To oMarketSheet.Columns(ColDate)
Do While rCount <= 42
If IsDate(oMarketSheet.Cells(rCount, ColDate)) Then
Do While ColAccntE < 23 'sCol = oMarketSheet.Rows(rCount, ColAcccntB) oMarketSheet.Columns(rCount, ColAccntE) ' ColAccnt)
iDate = oMarketSheet.Cells(rCount, ColDate)
Select Case Accnt
Case oMarketSheet.Columns(rCount, "10") = oMarketSheet.Columns(rCount, ColAccntB) ' = j
Accnt = "010-41200"
-
Feb 7th, 2005, 01:38 PM
#4
Re: Telling VBA to find a cell, row, column, range
Depending on how you have your column formatted (Date, Number, or Text) this will probably help.
VB Code:
Dim rCount As Range
Dim ColDate As Date
Dim ColAccntB As Integer
Dim ColAccntE As Integer
Dim ColRev As Integer
Dim Accnt As String
Dim rRow As Range
Dim rCell As Cell
We need to tackle the errors one at a time. Get those working then we can
move on to any others.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Feb 7th, 2005, 01:52 PM
#5
Thread Starter
Junior Member
Re: Telling VBA to find a cell, row, column, range
This user type has to be defined for the Cell and Range... how do I do that?
VB Code:
Dim rCell As Cell
Dim rCount As Range
Last edited by opie_18; Feb 7th, 2005 at 02:00 PM.
-
Feb 7th, 2005, 02:30 PM
#6
Re: Telling VBA to find a cell, row, column, range
Are you writting the code in the VBA Editor (behind Excel) or from Visual Basic?
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Feb 9th, 2005, 10:51 AM
#7
Thread Starter
Junior Member
Re: Telling VBA to find a cell, row, column, range
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|