+ Reply to Thread
Results 1 to 6 of 6

Disk full error

  1. #1
    Registered User
    Join Date
    05-07-2012
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    4

    Disk full error

    Hi,

    I am working on a vba macro which copies four cell's value in a row(left side of fifth column) to a notepad if the value in fifth cell's value in that row is numeric. It copies first row successfully but for the second row, third row...and so on it throws "DISK FULL ERROR".
    For your better understanding i am pasting the piece of code i am working with and i've attached the same as well,

    Sub test()
    Dim r As Integer
    Dim i As Integer
    Dim destnum As Integer
    Dim str As String

    r = 0
    i = 0

    Range("a1").Select
    Do Until IsEmpty(Selection.Value)
    Selection.Offset(1, 0).Select
    r = r + 1
    Loop

    Range("e1").Select
    For i = 1 To r Step 1
    If Selection.Value = " " Or Not IsNumeric(Selection.Value) Then
    Selection.Offset(1, 0).Select

    Else
    If i = 1 Then
    ActiveCell.Offset(0, -1).Select
    Range(ActiveCell, ActiveCell.Offset(0, -3)).Copy
    Shell "notepad.exe", vbNormalFocus
    SendKeys "^v"
    SendKeys "^s"
    SendKeys "beta.txt"
    SendKeys "{enter}"
    SendKeys "%{F4}"
    ActiveCell.Offset(1, 1).Select

    Else
    ActiveCell.Offset(0, -1).Select
    str = Range(ActiveCell, ActiveCell.Offset(0, -3)).Copy
    destnum = FreeFile()
    Open "beta.txt" For Append As destnum
    Print destnum, str
    SendKeys "^s"
    Close destnum
    ActiveCell.Offset(1, 1).Select
    End If
    End If
    Next
    End Sub

    Any help will be greatly appreciated.
    Thanx in advance.

    Himanshu
    Attached Files Attached Files

  2. #2
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Disk full error

    Hi Himanshu,

    Disk full error is related with hardware side.... have you tried running this code in other sytem - the system which do not have space issue OR may over LAN path ?

    Regards,
    DILIPandey

    <click on below 'star' if this helps>
    DILIPandey, Excel rMVP
    +919810929744 (India), +971528225509 (Dubai), dilipandey@gmail.com

  3. #3
    Registered User
    Join Date
    05-07-2012
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Disk full error

    Hi Dilip,

    Yes i've tried running very same code over LAN path also but no good same error is coming and in addition to this when i was running it keeping it in my desktop which is having ample amount of space then also it was giving the same error.
    Please help me i am stuck with the same problem for last three days.

    Regards,
    Himanshu

  4. #4
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Disk full error

    Hi Himanshu,

    Not sure about this.. have you tried connecting with your local IT helpdesk team?

    Regards,
    DILIPandey

    <click on below 'star' if this helps>

  5. #5
    Registered User
    Join Date
    05-07-2012
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Disk full error

    There is no hardware problem so I never tried to approach them.

    Thanx
    Himanshu

  6. #6
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Disk full error

    Okay...
    In my office, IT helpdesk love to solve software issue as well... no worries.. I am making myself an interesting party here to know the solution if any comes up. thanks.

    Regards,
    DILIPandey

    <click on below 'star' if this helps>

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1