Programming Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Iron Speed
Go Back   ASP Free ForumsOtherProgramming Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
Ajax Application Generator Generate database and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!
  #1  
Old March 10th, 2008, 10:12 AM
kickerym kickerym is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Mar 2008
Posts: 4 kickerym User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 15 m 19 sec
Reputation Power: 0
Excel Macro Help Needed

My excel macro has stopped working. It appears to have stopped on or just after February 29th. Any ideas as to why?

Reply With Quote
  #2  
Old March 11th, 2008, 09:57 AM
BLarche BLarche is offline
Contributing User
Click here for more information.
 
Join Date: Jan 2007
Location: Indianapolis, USA
Posts: 3,039 BLarche User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)BLarche User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)BLarche User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)BLarche User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)BLarche User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)BLarche User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)BLarche User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)BLarche User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)BLarche User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)BLarche User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)BLarche User rank is Lieutenant Colonel (40000 - 50000 Reputation Level) 
Time spent in forums: 1 Month 3 Days 20 h 31 m 48 sec
Reputation Power: 469
A monkey hacked into your code and left a banana peel that your code eventually stepped on, slipped, and crashed? Logically, that could have been the answer, but who knows! I wonder why it didn't crash on say, January 29th? Maybe the monkey wasn't hungry then?

Reply With Quote
  #3  
Old March 11th, 2008, 10:39 AM
sbenj69's Avatar
sbenj69 sbenj69 is offline
Dark Sonic Apprentice :D
Click here for more information. Click here for more information
 
Join Date: Feb 2007
Location: Redneck part of Illinois
Posts: 1,296 sbenj69 User rank is General (90000 - 100000 Reputation Level)sbenj69 User rank is General (90000 - 100000 Reputation Level)sbenj69 User rank is General (90000 - 100000 Reputation Level)sbenj69 User rank is General (90000 - 100000 Reputation Level)sbenj69 User rank is General (90000 - 100000 Reputation Level)sbenj69 User rank is General (90000 - 100000 Reputation Level)sbenj69 User rank is General (90000 - 100000 Reputation Level)sbenj69 User rank is General (90000 - 100000 Reputation Level)sbenj69 User rank is General (90000 - 100000 Reputation Level)sbenj69 User rank is General (90000 - 100000 Reputation Level)sbenj69 User rank is General (90000 - 100000 Reputation Level)sbenj69 User rank is General (90000 - 100000 Reputation Level)sbenj69 User rank is General (90000 - 100000 Reputation Level)sbenj69 User rank is General (90000 - 100000 Reputation Level)sbenj69 User rank is General (90000 - 100000 Reputation Level)sbenj69 User rank is General (90000 - 100000 Reputation Level)  Folding Points: 137454 Folding Title: Super Ultimate Folder - Level 1Folding Points: 137454 Folding Title: Super Ultimate Folder - Level 1Folding Points: 137454 Folding Title: Super Ultimate Folder - Level 1Folding Points: 137454 Folding Title: Super Ultimate Folder - Level 1Folding Points: 137454 Folding Title: Super Ultimate Folder - Level 1Folding Points: 137454 Folding Title: Super Ultimate Folder - Level 1
Time spent in forums: 2 Weeks 3 Days 1 h 46 m 58 sec
Reputation Power: 984
lol, blarche.... monkies don't hack Excel code, they only hack asp code. It was probably a ferrett. Umm, kicker.... you're going to have to give just a little more info. I mean, my car wouldn't start last week, do you know why?

The answer: I was drunk, inserting the keys in the glove compartment again trying to start my car, and I was on the wrong side.....

Need just a little bit more information to help you out.
__________________
Did I help you? If so gimme rep by clicking on the at the top right corner of this post

Madness does not always howl. Sometimes, it is the quiet voice at the end of the day saying, "Hey, is there room in your head for one more?"

Last edited by sbenj69 : March 11th, 2008 at 04:22 PM.

Reply With Quote
  #4  
Old March 11th, 2008, 10:44 AM
kickerym kickerym is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Mar 2008
Posts: 4 kickerym User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 15 m 19 sec
Reputation Power: 0
More info on my issue

Below is the code that is used in the macro. It worked as it was supposed to on Feb25 then after the 29th it would no longer work as designed. Nothing has changed on my system since it last worked.

Sub importer()
Dim wrkbk As Workbook
Dim curbk As Workbook
Set curbk = ActiveWorkbook
Dim filt As String
Dim countervar
Dim offsetvar
offsetvar = WorksheetFunction.CountA(Range("A:A"))
countervar = 0
filt = InputBox("What filter do you want to use", "Filter", "MIPR")
Dim nm

nm = Application.Dialogs(xlDialogOpen).Show
If nm = True Then
Set wrkbk = ActiveWorkbook
nm = wrkbk.ActiveSheet.Range("b1").Value
While Len(nm) > 0
If InStr(wrkbk.ActiveSheet.Range("a1").Offset(countervar, 0).Value, filt) > 0 Then
If WorksheetFunction.CountIf(curbk.ActiveSheet.Range( "B:B"), wrkbk.ActiveSheet.Range("b1").Offset(countervar, 0).Value) = 0 Then
curbk.ActiveSheet.Range("1:1").Offset(offsetvar, 0).Value = wrkbk.ActiveSheet.Range("1:1").Offset(countervar, 0).Value
offsetvar = offsetvar + 1
End If
End If
countervar = countervar + 1
nm = wrkbk.ActiveSheet.Range("b1").Offset(countervar, 0).Value
Wend
wrkbk.Close False
End If

End Sub

Reply With Quote
  #5  
Old March 11th, 2008, 11:15 AM
AOG123's Avatar
AOG123 AOG123 is offline
Registered Hero
ASP Free Novice (500 - 999 posts)
 
Join Date: Oct 2006
Posts: 866 AOG123 User rank is General (90000 - 100000 Reputation Level)AOG123 User rank is General (90000 - 100000 Reputation Level)AOG123 User rank is General (90000 - 100000 Reputation Level)AOG123 User rank is General (90000 - 100000 Reputation Level)AOG123 User rank is General (90000 - 100000 Reputation Level)AOG123 User rank is General (90000 - 100000 Reputation Level)AOG123 User rank is General (90000 - 100000 Reputation Level)AOG123 User rank is General (90000 - 100000 Reputation Level)AOG123 User rank is General (90000 - 100000 Reputation Level)AOG123 User rank is General (90000 - 100000 Reputation Level)AOG123 User rank is General (90000 - 100000 Reputation Level)AOG123 User rank is General (90000 - 100000 Reputation Level)AOG123 User rank is General (90000 - 100000 Reputation Level)AOG123 User rank is General (90000 - 100000 Reputation Level)AOG123 User rank is General (90000 - 100000 Reputation Level)AOG123 User rank is General (90000 - 100000 Reputation Level) 
Time spent in forums: 3 Weeks 1 Day 20 h 52 m 33 sec
Reputation Power: 946
Do you get an error message,...? unfortunately something has changed since the 29th otherwise it would still be working

Reply With Quote
  #6  
Old March 11th, 2008, 11:29 AM
kickerym kickerym is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Mar 2008
Posts: 4 kickerym User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 15 m 19 sec
Reputation Power: 0
I do not get any error messages. When I open the spreadsheet and run the macro all indications are that it runs. It opens the other sheet as it should andthen closes it but never copies any of the data as it should.

Reply With Quote
  #7  
Old March 11th, 2008, 11:36 AM
sbenj69's Avatar
sbenj69 sbenj69 is offline
Dark Sonic Apprentice :D
Click here for more information. Click here for more information
 
Join Date: Feb 2007
Location: Redneck part of Illinois
Posts: 1,296 sbenj69 User rank is General (90000 - 100000 Reputation Level)sbenj69 User rank is General (90000 - 100000 Reputation Level)sbenj69 User rank is General (90000 - 100000 Reputation Level)sbenj69 User rank is General (90000 - 100000 Reputation Level)sbenj69 User rank is General (90000 - 100000 Reputation Level)sbenj69 User rank is General (90000 - 100000 Reputation Level)sbenj69 User rank is General (90000 - 100000 Reputation Level)sbenj69 User rank is General (90000 - 100000 Reputation Level)sbenj69 User rank is General (90000 - 100000 Reputation Level)sbenj69 User rank is General (90000 - 100000 Reputation Level)sbenj69 User rank is General (90000 - 100000 Reputation Level)sbenj69 User rank is General (90000 - 100000 Reputation Level)sbenj69 User rank is General (90000 - 100000 Reputation Level)sbenj69 User rank is General (90000 - 100000 Reputation Level)sbenj69 User rank is General (90000 - 100000 Reputation Level)sbenj69 User rank is General (90000 - 100000 Reputation Level)  Folding Points: 137454 Folding Title: Super Ultimate Folder - Level 1Folding Points: 137454 Folding Title: Super Ultimate Folder - Level 1Folding Points: 137454 Folding Title: Super Ultimate Folder - Level 1Folding Points: 137454 Folding Title: Super Ultimate Folder - Level 1Folding Points: 137454 Folding Title: Super Ultimate Folder - Level 1Folding Points: 137454 Folding Title: Super Ultimate Folder - Level 1
Time spent in forums: 2 Weeks 3 Days 1 h 46 m 58 sec
Reputation Power: 984
the most likely cause would be that it's not retrieving the data correctly from the other sheet. Meaning it doesn't have any data to copy. Try doing a msgbox with the values of each record you are trying to copy before you copy it. My guess is it's not finding any records to copy.

Do a msgbox(nm) after this line:
nm = Application.Dialogs(xlDialogOpen).Show

If it doesn't = true at this point, then that's why it's not copying. If it does, we'll go onto the next part to debug.
Comments on this post
AOG123 agrees: yep, debug it step by step to find out which bit is not doing its job

Reply With Quote
Reply

Viewing: ASP Free ForumsOtherProgramming Help > Excel Macro Help Needed


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

 Free IT White Papers!
 
Accelerating Trading Partner Performance
One in five. That's how many partner transactions have at least one error. That is an amazing statistic, particularly given the extraordinary leaps in innovation across the global supply chain during the past two decades. Download this white paper to learn more.

 
Competing on Analytics
This Tech Analysis is designed to help identify characteristics shared by analytics competitors, and includes information about 32 organizations that have made a commitment to quantitative, fact-based analysis.

 
Cost Effective Scaling with Virtualization and Coyote Point Systems
An overview of the industry trend toward virtualization, how server consolidation has increased the importance of application uptime and the steps being taken to integrate load balancing technology with virtualized servers.

 
Five Checkpoints to Implementing IP Telephony
Implementation planning for IP PBX software and IP telephony has become vital as businesses replace discontinued legacy PBX phone systems. This informative whitepaper outlines five "checkpoints" for any implementation plan that will help make IP communications a successful proposition.

 
Hosted Email Security: Staying Ahead of New Threats
In the last two years, email has become a fierce battleground between the nefarious forces of spam and malware, and the heroes of messaging protection. The spam volumes increased alarmingly every month, bringing clever new forms of phishing and virus propagation attacks.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway