In case anyone has the same issue I managed to fix the code by changing it to the following;
% --------------------------------------------------------------------
function varargout = listbox_x_CreateFcn(h, eventdata, handles, varargin)
D = dir('*.mat'); %Scan directory for .mat files
listbox_x_string = {D(:).name}; %Set to display full name of files found
set(h,'String',listbox_x_string); %Display list of files in ListBox_x
guidata(gcbo,handles)
% --------------------------------------------------------------------
function varargout = edit_x_Callback(h, eventdata, handles, varargin)
edit_x_string = get(h,'String');
guidata(gcbo,handles)
D = dir('*.mat');
listbox_x_string = {D(:).name};
match_x = strmatch(edit_x_string,listbox_x_string)
set(handles.listbox_x,'String',listbox_x_string(match_x))
guidata(gcbo,handles)